新的初始化程序中的decltype(auto)?

时间:2015-02-28 17:33:22

标签: c++ c++11 auto

在C ++ 11中,我可以做到以下几点:

auto a = new auto{42};

但是我尝试过的编译器中没有以下任何工作:

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

如何在C ++ 11中的新初始化程序中使用decltype(auto)

1 个答案:

答案 0 :(得分:5)

decltype(auto)C++14 feature

相关问题