https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118398
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > lambda are not considered an immediate context which is why func1 fails for > GCC and clang. > > Also unused template arguments for concepts are not taken into account so in > this cases the lambdas for C2 are ignored. This is why GCC works (clang has > a bug in this area; let me find that issue). See PR 105615 and PR 102419. So GCC is correct here.