]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Silence some copy warnings on C++11 compilers.
authorSadie Powell <sadie@witchery.services>
Sat, 1 Aug 2020 12:24:36 +0000 (13:24 +0100)
committerSadie Powell <sadie@witchery.services>
Sat, 1 Aug 2020 12:24:36 +0000 (13:24 +0100)
include/flat_map.h

index 5d888fa9bf6f09661942e3ab53c2333848ed5853..8afe180aed6f510c610601c2e070130610854ae9 100644 (file)
@@ -92,6 +92,10 @@ class flat_map_base
        {
        }
 
+#if __cplusplus >= 201103L
+       flat_map_base& operator=(const flat_map_base& other) = default;
+#endif
+
        size_type size() const { return vect.size(); }
        bool empty() const { return vect.empty(); }
        size_type capacity() const { return vect.capacity(); }
@@ -223,6 +227,10 @@ class flat_set : public detail::flat_map_base<T, Comp, T, ElementComp>
        {
        }
 
+#if __cplusplus >= 201103L
+       flat_set& operator=(const flat_set& other) = default;
+#endif
+
        std::pair<iterator, bool> insert(const value_type& x)
        {
                return this->insert_single(x);
@@ -263,6 +271,10 @@ class flat_multiset : public detail::flat_map_base<T, Comp, T, ElementComp>
        {
        }
 
+#if __cplusplus >= 201103L
+       flat_multiset& operator=(const flat_multiset& other) = default;
+#endif
+
        iterator insert(const value_type& x)
        {
                return this->insert_multi(x);
@@ -306,6 +318,10 @@ class flat_map : public detail::flat_map_base<std::pair<T, U>, Comp, T, detail::
        {
        }
 
+#if __cplusplus >= 201103L
+       flat_map& operator=(const flat_map& other) = default;
+#endif
+
        std::pair<iterator, bool> insert(const value_type& x)
        {
                return this->insert_single(x);
@@ -358,6 +374,10 @@ class flat_multimap : public detail::flat_map_base<std::pair<T, U>, Comp, T, det
        {
        }
 
+#if __cplusplus >= 201103L
+       flat_multimap& operator=(const flat_multimap& other) = default;
+#endif
+
        iterator insert(const value_type& x)
        {
                return this->insert_multi(x);