Skip to content

[basic.lookup.classref]p1 CWG 682: Should allow alias-templates followed by '<' #2593

@RealLitb

Description

@RealLitb

The text currently renders this ill-formed, because "c.U" in the context of the postfix expression doesn't find 'U' as a class-template, but alias template:

   struct C { typedef C type; int dummy; };

   template<typename>
   using U = C;

   int main() {
       C c;
       c.U<void>::dummy = 0;
   }

GCC and Clang implement the obvious, so I suspect this can be fixed editorially (stealing the wording used for "only-templates-that-yield-types::something" lookup).

Metadata

Metadata

Assignees

No one assigned

    Labels

    cwgIssue must be reviewed by CWG.not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions