vendredi 3 février 2017

Is std::move(a).m an xvalue or a prvalue?

Let's say m is a non-static data member of non-reference type (T). According to cppreference, std::move(a).m is a prvalue until c++11. I guess it should be an xvalue after c++11. Please correct me if I'm wrong.

But the decltype(std::move(a).m) is still T (not T&&) in c++14 (visual studio, clang, gcc), which suggest std::move(a).m is still a prvalue. So is std::move(a).m an xvalue or a prvalue?

Aucun commentaire:

Enregistrer un commentaire