What does decltype((…)) with double parentheses mean? [duplicate]

Just above that example, it says

  • if e is an unparenthesized id-expression or a class member access (5.2.5), decltype(e) is the type of the entity named by e.
  • if e is an lvalue, decltype(e) is T&, where T is the type of e;

I think decltype(a->x) is an example of the “class member access” and decltype((a->x)) is an example of lvalue.

Leave a Comment