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

            Bug ID: 127349
           Summary: [reflection] wrong lookup of template in spliced
                    namespace
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

While while working on bug 12665 I found bug 127344 and while working on bug
127344 I found this:

```
template<class> struct Y {};
namespace N { template<class> struct X {}; }

template<auto ns>
void f () {
  typename [:ns:]::template X<int> a;   // OK
  typename [:ns:]::template Y<int> b;   // should be an error: Y is not a
member of N
}
void g () { f<^^N>(); }
```

but we accept this test.  clang++ rejects with the error above:
error: no member named 'Y' in namespace 'N'

Reply via email to