https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64095
Patryk <malekpatryk+gcc at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |malekpatryk+gcc at gmail dot com --- Comment #1 from Patryk <malekpatryk+gcc at gmail dot com> --- Related issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68071. I can confirm this is also a problem in 6.1.0 and 5.2.1. The workaround for me for this issue is to name the parameter pack that ends up being empty: #include <iostream> int main() { auto f = [](auto&& arg1, auto&& arg2, auto&& ...x)// this works //auto f = [](auto&& arg1, auto&& arg2, auto&& ...x)// this gives the below error { std::cout << arg1 << arg2; }; f("a", "b"); } error on commented line on 5.2.1 main.cpp: In function βint main()β: main.cpp:10:13: error: no match for call to β(main()::<lambda(auto:1&&, auto:2&&, auto:3&&, ...)>) (const char [2], const char [2])β f("a", "b"); ^ main.cpp:5:51: note: candidate: template<class auto:1, class auto:2, class auto:3> main()::<lambda(auto:1&&, auto:2&&, auto:3&&, ...)>::operator decltype (((main()::<lambda(auto:1&&, auto:2&&, auto:3&&, ...)>)0u).operator()(arg1, arg2, <anonymous>)) (*)(auto:1&&, auto:2&&, auto:3&&, ...)() const <deleted> auto f = [](auto&& arg1, auto&& arg2, auto&& ...) ^ main.cpp:5:51: note: template argument deduction/substitution failed: main.cpp:10:13: note: candidate expects 1 argument, 2 provided f("a", "b"); ^ main.cpp:5:51: note: candidate: template<class auto:1, class auto:2, class auto:3> main()::<lambda(auto:1&&, auto:2&&, auto:3&&, ...)> auto f = [](auto&& arg1, auto&& arg2, auto&& ...) ^ main.cpp:5:51: note: template argument deduction/substitution failed: main.cpp:10:13: note: candidate expects 3 arguments, 2 provided f("a", "b"); ^