Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void foo(std::string&& s);
- void bar(std::string&& s) {
- foo(s);
- // continue to use s...
- // oops, s might have been moved
- }
- void bar(std::string&& s) {
- foo(std::move(s));
- // we know that s might have been moved
- }
Add Comment
Please, Sign In to add comment