I just discovered that this compiles fine with no error (gcc 5.3):
std::vector<whatever> vec;
for( e: vec )
// do something
All the compiler does is issue this warning:
warning: range-based for loop without a type-specifier only available with -std=c++1z or -std=gnu++1z
Could someone explain:
- what that code does (is it only a way to assume
auto
without typing it, or is there more ?) - what c++1z is (I know c++11, c++14, never heard of c++1z...)