From 1db7f3029611db2d4a66699a887426d69ee0b411 Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Fri, 20 Jan 2017 16:20:22 +1100 Subject: [PATCH] flat_base: move swap() --- src/util/ue2_containers.h | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) 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 {