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

--- Comment #12 from Vincent X <gulackeg at gmail dot com> ---
(In reply to Patrick Palka from comment #11)
> Fixed on trunk so far
Testing on GCC trunk, it seems that name lookup in a mem-initializer-id faces
the same issue:

    // https://godbolt.org/z/Mh3hYzd15

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

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

    template <class T> struct S2 : T::B { // OK
      // error: 'typename A::B' names 'int A::B', which is not a type
      S2() : T::B{} {}
    };
    template class S2<A>;

Perhaps this could be fixed as well, so we don't need a separate issue.

Reply via email to