// PR c++/65949 // { dg-do compile { target c++14 } } #include template struct Over : T, Over::type { using type = Over; Over(T f1, Ts... f2) : T(f1), Over::type(f2...) { } using T::operator(); using Over::type::operator(); }; template struct Over : T { using type = T; using T::operator(); }; template auto CreateLambdas(Lambdas... lambdas) { return Over(lambdas...); } int main() { auto mesLambda = CreateLambdas ( []() { }, [](auto i) { (void)i; }, [](auto... args) { auto list = {args...}; for(auto &&a : list) (void)a; return 3; } ); mesLambda(); mesLambda(1); mesLambda(12,24,36,48); }