Please help to understand on below
class Demo {};
Demo && fun() {
Demo d;
cout << "Addres of d in fun " << &d << endl;
return move(d);
}
int main()
{
Demo && d = fun()
}
Is this the correct way to return object ??
Aucun commentaire:
Enregistrer un commentaire