[Bug c++/126836] New: [contracts] pack index on an argument in a post condition

"waffl3x at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
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);
```
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.