https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119574
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r15-3530-gdfb63765e994be. Before that rev we accepted the code.
But GCC 14 also ICEs and GCC 13 says:
119574.C: In instantiation of ‘void f(F) [with F = <lambda()>]’:
119574.C:4:15: required from here
119574.C:2:23: error: no match for call to ‘(<lambda()>) ()’
2 | void f(F op = {}) { op(); }
| ~~^~
119574.C:1:30: note: candidate: ‘template<auto G> <lambda()>’
1 | template <class F = decltype([] <auto G = [] {}> () {})>
| ^
119574.C:1:30: note: template argument deduction/substitution failed:
so I'm not sure it's a P1 regression.