What is the difference between
int a = 42;
and
int&& rvr = 42;
?
a is obviously an lvalue, but rvr is also an lvalue since it is a named variable, so can these expressions be considered exactly equivalent, and if not, in which scenarios the int&& declaration is preferred?
Aucun commentaire:
Enregistrer un commentaire