lundi 25 avril 2016

What is the difference between rvalue and xvalue?

I am trying to better understand the std::move(). I used to think it creates a cast to an rvalue reference. But in the documentation I have come across this:

std::move produces an xvalue expression that identifies its argument. It is exactly equivalent to a static_cast to an rvalue reference type.

It is unclear for me, why there exist xvalue's alongside with rvalue's? Is it a matter of the C++11 vs. C++14 standard?

Aucun commentaire:

Enregistrer un commentaire