3 ms·
auto by default removes top level const, reference qualification, and decays arrays and function types to pointer, same as for template argument deduction [1];
by gpderetta 5y ago
auto by default removes top level const, reference qualification, and decays arrays and function types to pointer, same as for template argument deduction [1]; this is also true when auto is used as for return type deduction.
You can use decltype(auto) to preserve the actual type of the rhs.
[1] as discussed elsewhere initializer lists behave differently, but initializer_list itself was a mistake to start with.