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

            Bug ID: 112696
           Summary: ICE When specializing auto... parameter pack with
                    typed pack
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mrcmnn at gmail dot com
  Target Milestone: ---

Hi everybody!

I'm experiencing ICE when trying to specialize an `<auto...>` parameter pack in
a struct. My main use-case involves concept, but I've been able to reproduce
the problem without.

I can reproduce this in g++ 10.5/11.4/12.3/13.2.

The reproduction looks like:

```c++
template <auto...>
struct sum;

template <int s, typename...Sz, Sz...sz>
struct sum<s, sz...> {
    static constexpr int value = (s + ... + sz);
};

static_assert(sum<10, 1, 2>::value == 13);
```

Consider that replacing `typename...Sz, Sz...sz` with `auto...` works:

```c++
template <auto...>
struct sum;

template <int s, auto...sz>
struct sum<s, sz...> {
    static constexpr int value = (s + ... + sz);
};

static_assert(sum<10, 1, 2>::value == 13);
```

Reply via email to