vendredi 26 février 2016

Why can I assign something to rValue string?

As I expected this code doesn't compile because move gives you rValue and you can't assign anything to rValue:

int a, b;
move(a) = b;

The question is why below code compiles?

string a, b;
move(a) = b;

Aucun commentaire:

Enregistrer un commentaire