samedi 28 février 2015

decltype(auto) in new initializer?

In C++11 I can do the following just fine:



auto a = new auto{42};


But none of the following work in any compiler I've tried:



decltype(auto) a = new decltype(auto){42};
auto a = new decltype(auto){42};


How do I use decltype(auto) in a new initializer in C++11?


Aucun commentaire:

Enregistrer un commentaire