https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126878
Bug ID: 126878
Summary: [contracts] parameter pack of reference type used in a
contract assertion is rejected
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: waffl3x at protonmail dot com
Target Milestone: ---
https://godbolt.org/z/8W857531h
```
template<typename... Args>
void f(Args&... args)
pre((... && args)) {}
template void f<int>(int&);
```
Emits "'const' qualifiers cannot be applied to 'Args&'"
This occurs in all 3 contract assertion types, with pack expansion,
fold expression and pack index. I suspect there are more bugs around
here. I will try to add exhaustive test cases covering most the trivial
cases once I've fixed this one.