https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123080

--- Comment #3 from Egas  Ribeiro <egas.g.ribeiro at tecnico dot ulisboa.pt> ---
i looked into this for a while and it seems that generic lambdas with auto
parameters aren't recognized as templates at the point where constraints are
checked.

for example,when in grokfndecl, we have processing_template_decl == 0 for:

auto f = [](auto x) requires requires { typename type_identity<int>::type(0); }
{};

but processing_template_decl == 1 for:

auto f = []<typename T>(T x) requires requires { typename
type_identity<int>::type(0);}{};

the code path doesn't seem to expect a generic lambda like this, many locations
don't know how to handle these cases and end up failing in one way or another
as well.

Reply via email to