decltype(&(C::member)) yields pointer-to-member type #40906
Labels
accepts-invalid
bugzilla
Issues migrated from bugzilla
c++
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
confirmed
Verified by a second party
Extended Description
In some contexts, decltype(&(C::member)) yields a pointer to member type, but according to [expr.unary.op]/4, no pointer to member should be formed when the operand of the & operator is enclosed in parentheses.
http://eel.is/c++draft/expr.unary.op#4
The code below demonstrates this behavior. It compiles on all Clang versions I have tried between 3.2 and HEAD, even though I don't think it should.
The text was updated successfully, but these errors were encountered: