I am updating critical libraries to use restrictions, as implemented in C ++ 11 g ++ and MSVC with the keyword __restrict. This is apparently the most standard extension, so I will use restrictit __restrictinterchangeably.
restrict is the C99 keyword, but nonetheless, compilers have identified important uses for it in C ++.
This post intends to be a “question” asking about what C ++ is a specific use and what it means, and then the CW answer, answering it. Feel free to add / check / edit. So: "Help! What do these C ++ mean for the keyword restrict?"
Qualification this(method limitation):
void Foo::method(int*__restrict a) __restrict { }
Limit the link:
int&__restrict x = ;
Limit inside the template:
std::vector<float*__restrict> x;
/. C struct, ++ , C:
class Foo final { public: int*__restrict field; };