fork(1) download
  1. #include <array>
  2. struct blah { };
  3.  
  4. template<typename... Args>
  5. constexpr auto foo(Args&&... args)
  6. {
  7. return std::array<blah, sizeof...(Args)>{{ blah{args}... }};
  8. }
  9.  
  10. int main()
  11. {
  12. auto res = foo({}, {});
  13. return 0;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:12:23: error: too many arguments to function ‘constexpr auto foo(Args&& ...) [with Args = {}]’
  auto res = foo({}, {});
                       ^
prog.cpp:5:16: note: declared here
 constexpr auto foo(Args&&... args)
                ^~~
stdout
Standard output is empty