fork download
  1. #include <iostream>
  2. #include <utility>
  3.  
  4. int main ()
  5. {
  6. auto f = +[] (std::string s)
  7. {
  8. return std::string (std::move (s));
  9. };
  10. std::string s ("hello");
  11. f (std::move (s));
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:6:10: error: 'f' does not name a type
     auto f = +[] (std::string s)
          ^
prog.cpp:11:8: error: 'move' is not a member of 'std'
     f (std::move (s));
        ^
prog.cpp:11:21: error: 'f' was not declared in this scope
     f (std::move (s));
                     ^
stdout
Standard output is empty