I wonder how the following can be done
void f(string &&s) { std::string i(move(s)); /* other stuff */ } int main() { std::string s; bi
You can use a mutable lambda object.
auto func = [=]() mutable { f(std::move(s)); };