https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70942
--- Comment #2 from TC <rs2740 at gmail dot com> --- This only appears to affect captureless generic lambdas with a deduced return type. It might have something to do with the conversion function template to function pointer - I'm guessing that it was somehow instantiated for the wrong template argument during overload resolution, which result in the lambda's body being instantiated with the wrong argument too (to deduce the return type), which triggers the error.