Re:Don’t use C++ auto? Restricting auto is not the best deci...
by pjmlp on Thursday November 09, 2017 @12:48PM
(#15664312)
Type inference is orthogonal to whatever keyword is used.
Bjarne used another keyword in C with Classes, removed it due to backslash, and the commite decided to re-purpose auto for the same purpose in C++11.
No big deal, the meaning of static is also context dependent, and no one is fighting against it like it happens with the new meaning for auto.
Before C++11 auto meant it was not static, extern or register, and in fact every single variable was already implicitly auto if no specifier from the previous list was applied.
In that line, n was auto. Now it is not auto, only int.