type deduction

suggest change

Remarks

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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents