#include <iostream> #include <utility> int main () { auto f = +[] (std::string s) { return std::string (std::move (s)); }; std::string s ("hello"); f (std::move (s)); }
Standard input is empty
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)); ^
Standard output is empty