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

            Bug ID: 109390
           Summary: Does not reject specialized non-type argument of
                    dependent type in class template partial
                    specialization
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sbergman at redhat dot com
  Target Milestone: ---

As seen with e.g. gcc-c++-12.2.1-4.fc37.x86_64, it does not reject

> $ cat test.cc
> template<typename T, typename T::type> struct S {};
> template<typename T> struct S<T, 0> {};
> $ g++ -fsyntax-only test.cc

even though I think it should per (e.g. C++20) [temp.class.spec]/9.1 "The type
of a template parameter corresponding to a specialized non-type argument shall
not be dependent on a parameter of the specialization."

(I'm not sure whether or not this should be considered a duplicate of bug
102158 "[C++20] Specialized non-type template argument violates
[temp.spec.partial#general-9] but accepted by GCC".)

Reply via email to