@@ -171,11 +171,8 @@ private:
}
return it1 == end1 && it2 == end2;
- friend void swap(trie & lhs, trie & rhs) {
- using std::swap;
- swap(lhs.value_, rhs.value_);
- swap(lhs.impl_, rhs.impl_);
- }
+
+ friend void swap(trie & lhs, trie & rhs);
mapped_type value_{};
backing_t impl_{};
@@ -112,3 +112,10 @@ namespace detail {
return rval;
+template <typename K, typename V, typename C>
+void swap(trie<K, V, C> & lhs, trie<K, V, C> & rhs) {
+ using std::swap;
+ swap(lhs.value_, rhs.value_);
+ swap(lhs.impl_, rhs.impl_);
+}