fork(1) download
  1. struct foo { int a, b, c; };
  2.  
  3. void i_only_take_three_braced_parameters(foo f)
  4. {
  5. // ...
  6. }
  7.  
  8. int main()
  9. {
  10. i_only_take_three_braced_parameters({1, 2, 3});
  11. i_only_take_three_braced_parameters({1, 2, 3, 4});
  12. }
  13.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:53: error: could not convert ‘{1, 2, 3, 4}’ from ‘<brace-enclosed initializer list>’ to ‘foo’
     i_only_take_three_braced_parameters({1, 2, 3, 4});
                                                     ^
stdout
Standard output is empty