void fcn(int&& a) { }
int&& reti() { return 3; }
int main() { int&& a = 3; fcn(a); //error fcn(reti()); //right return 0; }
why does the first call is error and the second call is right?they are all the int&& type.
Aucun commentaire:
Enregistrer un commentaire