https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65994
Bug ID: 65994 Summary: auto deduces object instead of initializer_list Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: barry.revzin at gmail dot com Target Milestone: --- >From StackOverflow question: http://stackoverflow.com/q/30007692/2069064 Consider the following: struct Foo{}; int main() { Foo a; auto b{a}; a = b; } The code compiles because b gets deduced as Foo instead of std::initializer_list<Foo>. This new deduction rule is proposed in N3922 for C++1z but is not yet part of the standard, yet gcc still apparently interprets it that way (with either -std=c++11 or -std=c++14). While N3922 indicates that deducing b as std::initializer_list<Foo> is a defect in C++14, it still is in C++14.