fork download
  1. #include <iostream>
  2. using namespace std::placeholders;
  3.  
  4. int main() {
  5. auto f = _1 + _2;
  6. return f(2, 3);
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:22: error: ‘placeholders’ is not a namespace-name
 using namespace std::placeholders;
                      ^
prog.cpp:2:34: error: expected namespace-name before ‘;’ token
 using namespace std::placeholders;
                                  ^
prog.cpp: In function ‘int main()’:
prog.cpp:5:2: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  auto f = _1 + _2;
  ^
prog.cpp:5:7: error: ‘f’ does not name a type
  auto f = _1 + _2;
       ^
prog.cpp:6:15: error: ‘f’ was not declared in this scope
  return f(2, 3);
               ^
stdout
Standard output is empty