3 ms·
It was entirely another concept. Before C++11 auto meant it was not static, extern or register, and in fact every single variable was already implicitly auto i
by Shorel 9y ago
It was entirely another concept.
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.
int n = 10;
In that line, n was auto. Now it is not auto, only int.
- pjmlp 9y agoType 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.