Описание тега restrict-qualifier
Restrict is a keyword that could applied to a pointer to an object. It makes this pointer the one and only way to access the data of that object.
The restrict-qualifier tells the compiler that if the memory accessed by the restrict-qualified pointer is modified, no other pointers will access it.
The compiler may use this hint to optimize the restrict-qualified pointers in such a way, that would otherwise cause incorrect or undefined behavior.
C++ supports restrict
keyword for compatibility with C. However, a C++ compiler will ignore the restrict
keyword, because in C++ "restrict" is a valid variable name. C++ compilers, though, have a special __restrict__
qualifier.
In-detail information along with examples can be found on the IBM website.