From: Justin Viiret Date: Fri, 20 Jan 2017 05:20:22 +0000 (+1100) Subject: flat_base: move swap() X-Git-Tag: v4.5.0^2~295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1db7f3029611db2d4a66699a887426d69ee0b411;p=thirdparty%2Fvectorscan.git flat_base: move swap() --- diff --git a/src/util/ue2_containers.h b/src/util/ue2_containers.h index 43376a0f..924cae95 100644 --- a/src/util/ue2_containers.h +++ b/src/util/ue2_containers.h @@ -137,6 +137,12 @@ public: void clear() { data().clear(); } + + void swap(flat_base &a) { + using std::swap; + swap(comp(), a.comp()); + swap(data(), a.data()); + } }; } // namespace flat_detail @@ -210,7 +216,6 @@ public: flat_set &operator=(const flat_set &) = default; flat_set &operator=(flat_set &&) = default; - // Iterators. 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. 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. size_type count(const key_type &key) const {