What does the restrict keyword mean in C++?

C++Server Side ProgrammingProgramming

There's no such keyword in C++. List of C++ keywords can be found in section 2.11/1 of C++ language standard. restrict is a keyword in the C99 version of C language and not in C++.

In C, A restrict-qualified pointer (or reference) is basically a promise to the compiler that for the scope of the pointer, the target of the pointer will only be accessed through that pointer (and pointers copied from it).

C++ compilers also support this definition for optimization purposes, but it is not a part of the official language specification.

raja
Published on 15-Feb-2018 12:14:13
Advertisements