rsnt_translations
56,430
edits
(Created page with "===Mot-clé <tt>restrict</tt> === Une des manières de dire au compilateur que les pointeurs '''ne sont pas''' des alias est d'utiliser le mot-clé <tt>restrict</tt>, intro...") |
(Created page with "Utilisation du mot-clé <tt>restrict</tt>") |
||
Line 178: | Line 178: | ||
{{Callout | {{Callout | ||
|title= | |title=Utilisation du mot-clé <tt>restrict</tt> | ||
|content= | |content= | ||
Declaring a pointer as restricted formally means that for "the lifetime of the pointer, only it or a value derived from it (such as <tt>ptr +1</tt>) will be used to access the object to which it points". This is a guarantee that the ''programmer'' gives to the ''compiler''. If the programmer violates this guarantee, behaviour is undefined. For more information on this concept, see this [https://en.wikipedia.org/wiki/Restrict Wikipedia article]. | Declaring a pointer as restricted formally means that for "the lifetime of the pointer, only it or a value derived from it (such as <tt>ptr +1</tt>) will be used to access the object to which it points". This is a guarantee that the ''programmer'' gives to the ''compiler''. If the programmer violates this guarantee, behaviour is undefined. For more information on this concept, see this [https://en.wikipedia.org/wiki/Restrict Wikipedia article]. |