Last active
August 29, 2015 14:24
-
-
Save motonacciu/26fa2efed62db771e936 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| std::vector<Object> dst_objs; | |
| // transform an iterator into a moveable one | |
| auto it = std::make_move_iterator(src_objs.begin()), | |
| end = std::make_move_iterator(src_objs.end()); | |
| std::copy_if(it, end, std::back_inserter(dst_objs), | |
| [](const Object& cur) { return cur.type() == Type::TYPE1; }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment