mercredi 31 mai 2017

What does the scope resolution operator return in case of Type::var?

Consider the following example:

class A { int x; };

Now what is A::x?

  • It cannot be an lvalue because it does not refer to a storage Location.
  • It cannot be a type, because the type would be decltype(A::x).

Aucun commentaire:

Enregistrer un commentaire