mercredi 15 janvier 2020

Is Widget&& rhs an lvalue or an rvalue reference

In Effective Modern C++

class Widget {
public:
 Widget(Widget&& rhs); // rhs is an lvalue, though it has
 …                    // an rvalue reference type
};

rhs is an lvalue

void f(Widget&& param); // rvalue reference

param is an rvalue reference

what is the difference between rhs and param?

Aucun commentaire:

Enregistrer un commentaire