mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
flat_base: move swap()
This commit is contained in:
parent
f8166fac25
commit
1db7f30296
@ -137,6 +137,12 @@ public:
|
|||||||
void clear() {
|
void clear() {
|
||||||
data().clear();
|
data().clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void swap(flat_base &a) {
|
||||||
|
using std::swap;
|
||||||
|
swap(comp(), a.comp());
|
||||||
|
swap(data(), a.data());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace flat_detail
|
} // namespace flat_detail
|
||||||
@ -210,7 +216,6 @@ public:
|
|||||||
flat_set &operator=(const flat_set &) = default;
|
flat_set &operator=(const flat_set &) = default;
|
||||||
flat_set &operator=(flat_set &&) = default;
|
flat_set &operator=(flat_set &&) = default;
|
||||||
|
|
||||||
|
|
||||||
// Iterators.
|
// Iterators.
|
||||||
|
|
||||||
iterator begin() { return iterator(data().begin()); }
|
iterator begin() { return iterator(data().begin()); }
|
||||||
@ -291,12 +296,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void swap(flat_set &a) {
|
|
||||||
using std::swap;
|
|
||||||
swap(comp(), a.comp());
|
|
||||||
swap(data(), a.data());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lookup.
|
// Lookup.
|
||||||
|
|
||||||
size_type count(const value_type &value) const {
|
size_type count(const value_type &value) const {
|
||||||
@ -546,12 +545,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void swap(flat_map &a) {
|
|
||||||
using std::swap;
|
|
||||||
swap(comp(), a.comp());
|
|
||||||
swap(data(), a.data());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lookup.
|
// Lookup.
|
||||||
|
|
||||||
size_type count(const key_type &key) const {
|
size_type count(const key_type &key) const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user