Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <typename T1, typename ftor1>
- void swap(partitioned_vector<T1, ftor1>& other) {
- std::vector<T1> bazinga;
- bazinga.insert( bazinga.end(), other.t.begin(), other.t.end() );
- bazinga.insert( bazinga.end(), other.f.begin(), other.f.end() );
- other.f.clear();
- other.t.clear();
- for (auto e : t) {
- other.insert(e);
- }
- for (auto e : f) {
- other.insert(e);
- }
- f.clear();
- t.clear();
- for (auto e : bazinga) {
- insert(e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement