As the title, I have two expressions:
int&& a = const_cast<int&&>(int{10});
int&& a = const_cast<int&&>(10);
The first compiling passed, but second not. Why is this happening?
In my view, it's because 10 is a literal and int{10} is a unamed variable. Is it?
Aucun commentaire:
Enregistrer un commentaire