dimanche 16 juin 2019

Why lvalue reference and rvalue reference collapses in lvalue reference?

Let's consider this code:

int i=0;

using U = int&;
U&& x = i;

using V = int&&;
V& y = i;

Could you please explain the motivation for these reference collapsing rules?

Aucun commentaire:

Enregistrer un commentaire