clang vs gcc - empty generic lambda variadic argument pack
问题 I think I found another "clang vs gcc" inconsistency between lambdas and callable objects. decltype(l)::operator() should be equivalent to C::operator() , but if variadic pack is left empty in the generic lambda, gcc refuses to compile: 15 : error: no match for call to '(main()::) (int)' l(1); 15 : note: candidate: decltype (((main()::)0u).main()::(x, )) (*)(auto:1&&, auto:2&&, ...) 15 : note: candidate expects 3 arguments, 2 provided 14 : note: candidate: template main():: auto l = [](auto&&