https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126836
Bug ID: 126836
Summary: [contracts] pack index on an argument in a post
condition
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: waffl3x at gcc dot gnu.org
Target Milestone: ---
https://godbolt.org/z/5az8o8vhx
```
template<typename... Args>
void f(Args... args)
post(args...[1]) {}
void go()
{
f<int, int const>(0, 0);
}
```
Does not manifest when all type arguments are const (or reference), the
following does not emit an error...
```
f<int const, int const>(0, 0);
```
...while this does.
```
f<int const, int const, int>(0, 0, 0);
```