template<typename... Values>void foo(Values...){} int main(){ foo(1, 2, 3, "hello", 'a'); foo({1}, {2, 3});}
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:9:20: error: too many arguments to function ‘void foo(Values ...) [with Values = {}]’ foo({1}, {2, 3}); ^ prog.cpp:2:6: note: declared here void foo(Values...) ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!