I looked in the standard for a definition of reference type but I could not find any. A naive interpretation of the reference type as the type of objects such as int & fails because according to the standard [basic.types] 10.3:
A type is a literal type if it is: […] a reference type
But the following static assert does not compile (in MSVC2015RC):
static_assert( ::std::is_literal_type< ::std::wstring & >::value, "Nope" );
What is the definition of a reference type?
Aucun commentaire:
Enregistrer un commentaire