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

            Bug ID: 120255
           Summary: C++ template member class parameter name should shadow
                    member name
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rockeet at gmail dot com
  Target Milestone: ---

template parameter name should hide member name.

```
struct A {
    struct B {};
    struct C {
        template<class B> void foo1(B*);
        template<class B> void foo2(B*) {} // ok
    };
    template<class B> void foo1(B*);
    template<class B> void foo2(B*) {} // ok
};
template<class B>
void A::C::foo1(B*) {} // fail
template<class B>
void A::foo1(B*) {} // fail
```

Reply via email to