H****r 发帖数: 2801 | 1 How come this function declared differently by different compilers?
It seems that VS2010 does not use this keyword? |
t****t 发帖数: 6806 | 2 memcpy规定源和目的不能overlap, 和restricted目的一样. 所以有restricted就可以
加上, 没有也没关系, 就靠程序员自觉了.
【在 H****r 的大作中提到】 : How come this function declared differently by different compilers? : It seems that VS2010 does not use this keyword?
|
f*****e 发帖数: 2992 | 3 可以overlap的那个函数是什么?忘了。
【在 t****t 的大作中提到】 : memcpy规定源和目的不能overlap, 和restricted目的一样. 所以有restricted就可以 : 加上, 没有也没关系, 就靠程序员自觉了.
|
H****r 发帖数: 2801 | 4 个人理解是可以加的啊,但是这个函数是在string.h里定义好的,而且有的document里
说是已经改成restricted的了, 而有的还是没有这个关键字...
【在 t****t 的大作中提到】 : memcpy规定源和目的不能overlap, 和restricted目的一样. 所以有restricted就可以 : 加上, 没有也没关系, 就靠程序员自觉了.
|
H****r 发帖数: 2801 | 5 memmove?
【在 f*****e 的大作中提到】 : 可以overlap的那个函数是什么?忘了。
|
t****t 发帖数: 6806 | 6 that doesn't matter to you, does it? you are not supposed to modify it
anyway. just use it as you will normally do.
【在 H****r 的大作中提到】 : 个人理解是可以加的啊,但是这个函数是在string.h里定义好的,而且有的document里 : 说是已经改成restricted的了, 而有的还是没有这个关键字...
|
nr 发帖数: 67 | 7 y
【在 H****r 的大作中提到】 : memmove?
|
H****r 发帖数: 2801 | 8 主要是影响个人对这个关键字的理解,感觉说明档和实际实现不同了。后来查了下发现
好像这个问题是Visual Studio貌似不用这个关键字,囧...
【在 t****t 的大作中提到】 : that doesn't matter to you, does it? you are not supposed to modify it : anyway. just use it as you will normally do.
|
k**********g 发帖数: 989 | 9 __restrict
to be applied to a local variable that is a pointer, inside a function body. |