https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117515
Bug ID: 117515
Summary: Error: calling constructor with lambda expression in
requires expression is invalid
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eczbek.void at gmail dot com
Target Milestone: ---
https://godbolt.org/z/xPG5a4nb1
```
struct A {
A(auto) {}
};
static_assert(requires { A([] {}); });
int main() {}
```
<source>:5:15: error: static assertion failed
5 | static_assert(requires { A([] {}); });
| ^~~~~~~~~~~~~~~~~~~~~~
<source>:5:15: note: constraints not satisfied
<source>:5:26: note: the required expression '(A)(<expression error>)' is
invalid
5 | static_assert(requires { A([] {}); });
| ^~~~~~~~
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more
detail
Compiler returned: 1