Re:C++17 Compiler Bug Hunt
by loup-vaillant on Friday April 06, 2018 @10:22AM
(#16773419)
Wait, is that an integer, or an array? Serious question, with initialiser lists I'm not sure any more.
auto i = {5};
is a std::initializer_list<int>, whereas auto i{5};
is an int (as of C++17): https://godbolt.org/g/eXXN3oSee also https://stackoverflow.com/questions/25612262/why-does-auto-x... .
If you change the compiler version (to e.g. gcc7) your blurb compiles in C++14.
auto i = { 1 };