There's an entry in the errata of Effective Modern C++ which says that
not all names are lvalues
What are these names? Specifically,
- is Scott just referring to the
nullptrandthisnamed prvalues? - Are there any others?
- In case the answer to 1 is yes, then what makes
nullptrspecial with respect totrueandfalse? They are all values of some type (true/falseof typebool,nullptrof typestd::nullptr_t). After alltruestays tobooljust like1stays toint, and1is not a "name which is not an lvalue", is it? At this point I'd ask why istruenot a name then?
Aucun commentaire:
Enregistrer un commentaire