register
suggest changeA storage class specifier that hints to the compiler that a variable will be heavily used. The word “register” is related to the fact that a compiler might choose to store such a variable in a CPU register so that it can be accessed in fewer clock cycles. It was deprecated in C++11 and removed in C++17. The sample is valid through C++14; the hint has no effect.
register int i = 0;
while (i < 100) {
f(i);
int g = i*i;
i += h(i, g);
}
Through C++14, both local variables and function parameters may be declared register. Unlike C, C++ does not place any restrictions on what can be done with a register variable. For example, it is valid to take the address of a register variable, but this may prevent the compiler from actually storing such a variable in a register.
Since C++17 the keyword register is unused and reserved. A program that uses the keyword register is ill-formed.