type deduction
suggest changeRemarks
In November 2014, the C++ Standardization Committee adopted proposal N3922, which removes the special deduction rule for auto and a braced initializer in direct-list-initialization. That rule is part of C++17. The paper asks that it also be treated as a defect in C++14, and major compilers apply it in earlier modes: auto x{item}; deduces the type of item rather than std::initializer_list, and more than one element is ill-formed. Copy-list-initialization, auto x = {item};, still deduces std::initializer_list.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents