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

            Bug ID: 119726
           Summary: Template Specialization of Inner class from Inherited
                    template class fails with: " too few
                    template-parameter-lists"
           Product: gcc
           Version: 14.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: awia00 at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/h3frfdqTf

The following code fails to commpile on GCC-14, but compiles with
clang-18/clang-19.



```
template<typename U>
struct A {
    template<typename T>
    struct AA {

    };
};

struct B : A<B>
{
};

template<>
struct B::AA<int> {

};

int main() {

}
```

GCC produces
```
<source>:14:11: error: too few template-parameter-lists
   14 | struct B::AA<int> {
      |           ^~~~~~~
Compiler returned: 1
```

Motivation: This is a use case for our strong typing library, where a base
class provides an inner class - but the inner class has to be specialized in
order to add custom constructors.

Reply via email to