This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68071] Generic lambda variadic argument pack cannot be empty
- From: "ralph.tandetzky at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Nov 2015 08:31:39 +0000
- Subject: [Bug c++/68071] Generic lambda variadic argument pack cannot be empty
- Auto-submitted: auto-generated
- References: <bug-68071-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68071
Ralph Tandetzky <ralph.tandetzky at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ralph.tandetzky at gmail dot com
--- Comment #2 from Ralph Tandetzky <ralph.tandetzky at gmail dot com> ---
I can confirm that error. The code
int main(){
[](auto...){}();
}
leads to the following compile-time error:
main.cpp: In function 'int main()':
main.cpp:2:23: error: no match for call to '(main()::<lambda(auto:1, ...)>)
()'
[](auto...){}();
^
main.cpp:2:19: note: candidate: template<class auto:1>
main()::<lambda(auto:1, ...)>
[](auto...){}();
^
main.cpp:2:19: note: template argument deduction/substitution failed:
main.cpp:2:23: note: candidate expects 1 argument, 0 provided
[](auto...){}();
^
This is the case for gcc 4.9 and gcc 5.2 with C++14 enabled. Clang 3.6 compiles
it.