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

            Bug ID: 122192
           Summary: Lookup for a dependent nested type as a base-specifier
                    should be type-only
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gulackeg at gmail dot com
  Target Milestone: ---

Test code:

    // https://godbolt.org/z/7f8PE88xs

    struct A {
      int B;
      struct B {};
    };

    struct S1 : A::B {}; // OK

    // - EDG/MSVC: OK
    // - GCC (<= 12.5): OK
    // - GCC (>= 13.1): error: 'typename A::B' names 'int A::B', which is
    //                         not a type
    // - Clang: error: typename specifier refers to non-type member 'B' in
    //                 'A'
    template <class T> struct S2 : T::B {};
    template class S2<A>;

Reply via email to