https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38087

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|WAITING                     |NEW

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
There's https://wg21.link/cwg555 but I don't think it changes anything here.

[expr.pseudo] definitely doesn't apply, as that only applies to non-class
types. (The bug title is wrong for the same reason, this is a destructor call,
not a pseudo destructor call.)

The current wording in [basic.lookup.classref] says "At least one of the
lookups shall find a name that refers to cv T." The object expression has type
C, but the lookup result for B does not find that type, so the code is invalid.

Reply via email to