https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127373
--- Comment #4 from Ivan Sokolov <sugrob9000aero at gmail dot com> ---
(Sorry to double-post, hit send a bit early)
(In reply to Drea Pinski from comment #2
> So it looks like it is lambda related because if I emulate it; things work:
As for this, I have no doubt that the bug is in closure type synthesis,
because emulating the ICE-ish example also works (as in, rejected with a
good message):
#include <concepts>
template <typename T>
using a = T(*)();
struct lambda {
template<std::integral I>
static I operator()() { return 0; }
template<typename I>
operator a<I>() { return operator(); }
};
float(*pfn)() = lambda{}; // rejected as expected