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

            Bug ID: 104043
           Summary: Non-type template specialization with another type is
                    accepted but ignored
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

This code
```
template <int...>
struct A;

template <char c>
struct A<c> {};

A<1> a;
```
is accepted by other compiler but GCC complains:
```
error: aggregate 'A<1> a' has incomplete type and cannot be defined
```
Demo: https://gcc.godbolt.org/z/MbrndEj6q

Reply via email to