libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe()
authorFrançois Dumont <fdumont@gcc.gnu.org>
Fri, 12 Nov 2021 06:26:33 +0000 (07:26 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 14 Nov 2021 20:55:01 +0000 (21:55 +0100)
_GLIBCXX_DEBUG container code cleanup to get rid of _Safe_container<>::_M_safe() and just
use _Safe:: calls which use normal inheritance. Also remove several usages of _M_base()
which can be most of the time ommitted and sometimes replace with explicit _Base::
calls.

libstdc++-v3/ChangeLog:

* include/debug/safe_container.h (_Safe_container<>::_M_safe): Remove.
* include/debug/deque (deque::operator=(initializer_list<>)): Replace
_M_base() call with _Base:: call.
(deque::operator[](size_type)): Likewise.
* include/debug/forward_list (forward_list(forward_list&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(forward_list::operator=(initializer_list<>)): Remove _M_base() calls.
(forward_list::splice_after, forward_list::merge): Likewise.
* include/debug/list (list(list&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(list::operator=(initializer_list<>)): Remove _M_base() calls.
(list::splice, list::merge): Likewise.
* include/debug/map.h (map(map&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(map::operator=(initializer_list<>)): Remove _M_base() calls.
* include/debug/multimap.h (multimap(multimap&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(multimap::operator=(initializer_list<>)): Remove _M_base() calls.
* include/debug/set.h (set(set&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(set::operator=(initializer_list<>)): Remove _M_base() calls.
* include/debug/multiset.h (multiset(multiset&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(multiset::operator=(initializer_list<>)): Remove _M_base() calls.
* include/debug/string (basic_string(basic_string&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(basic_string::operator=(initializer_list<>)): Remove _M_base() call.
(basic_string::operator=(const _CharT*), basic_string::operator=(_CharT)): Likewise.
(basic_string::operator[](size_type), basic_string::operator+=(const basic_string&)):
Likewise.
(basic_string::operator+=(const _Char*), basic_string::operator+=(_CharT)): Likewise.
* include/debug/unordered_map (unordered_map(unordered_map&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(unordered_map::operator=(initializer_list<>), unordered_map::merge):
Remove _M_base() calls.
(unordered_multimap(unordered_multimap&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(unordered_multimap::operator=(initializer_list<>), unordered_multimap::merge):
Remove _M_base() calls.
* include/debug/unordered_set (unordered_set(unordered_set&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(unordered_set::operator=(initializer_list<>), unordered_set::merge):
Remove _M_base() calls.
(unordered_multiset(unordered_multiset&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(unordered_multiset::operator=(initializer_list<>), unordered_multiset::merge):
Remove _M_base() calls.
* include/debug/vector (vector(vector&&, const allocator_type&)):
Remove _M_safe() and _M_base() calls.
(vector::operator=(initializer_list<>)): Remove _M_base() calls.
(vector::operator[](size_type)): Likewise.

12 files changed:
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/forward_list
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/safe_container.h
libstdc++-v3/include/debug/set.h
libstdc++-v3/include/debug/string
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/include/debug/vector

index 52778ba..a73d6c3 100644 (file)
@@ -166,7 +166,7 @@ namespace __debug
       deque&
       operator=(initializer_list<value_type> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
@@ -344,7 +344,7 @@ namespace __debug
       operator[](size_type __n) _GLIBCXX_NOEXCEPT
       {
        __glibcxx_check_subscript(__n);
-       return _M_base()[__n];
+       return _Base::operator[](__n);
       }
 
       _GLIBCXX_NODISCARD
@@ -352,7 +352,7 @@ namespace __debug
       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
       {
        __glibcxx_check_subscript(__n);
-       return _M_base()[__n];
+       return _Base::operator[](__n);
       }
 
       using _Base::at;
index cae5b5f..6ed4853 100644 (file)
@@ -242,8 +242,8 @@ namespace __debug
        noexcept(
          std::is_nothrow_constructible<_Base,
            _Base, const allocator_type&>::value )
-      : _Safe(std::move(__list._M_safe()), __al),
-       _Base(std::move(__list._M_base()), __al)
+      : _Safe(std::move(__list), __al),
+       _Base(std::move(__list), __al)
       { }
 
       explicit
@@ -287,7 +287,7 @@ namespace __debug
       forward_list&
       operator=(std::initializer_list<_Tp> __il)
       {
-       _M_base() = __il;
+       _Base::operator=(__il);
        this->_M_invalidate_all();
        return *this;
       }
@@ -584,7 +584,7 @@ namespace __debug
            return __it != __list._M_base().cbefore_begin()
                   && __it != __list._M_base().end();
          });
-       _Base::splice_after(__pos.base(), std::move(__list._M_base()));
+       _Base::splice_after(__pos.base(), std::move(__list));
       }
 
       void
@@ -613,8 +613,7 @@ namespace __debug
        _Base_const_iterator __next = std::next(__i.base());
        this->_M_transfer_from_if(__list, [__next](_Base_const_iterator __it)
          { return __it == __next; });
-       _Base::splice_after(__pos.base(), std::move(__list._M_base()),
-                           __i.base());
+       _Base::splice_after(__pos.base(), std::move(__list), __i.base());
       }
 
       void
@@ -669,7 +668,7 @@ namespace __debug
              { return __it == __tmp; });
          }
 
-       _Base::splice_after(__pos.base(), std::move(__list._M_base()),
+       _Base::splice_after(__pos.base(), std::move(__list),
                            __before.base(), __last.base());
       }
 
@@ -710,7 +709,7 @@ namespace __debug
                this->_M_invalidate_if([__next](_Base_const_iterator __it)
                                       { return __it == __next; });
                __to_destroy.splice_after(__to_destroy.cbefore_begin(),
-                                         _M_base(), __old);
+                                         *this, __old);
                __x = __old;
                _GLIBCXX20_ONLY( __removed++ );
              }
@@ -739,7 +738,7 @@ namespace __debug
                  this->_M_invalidate_if([__x](_Base_const_iterator __it)
                                         { return __it == __x; });
                  __to_destroy.splice_after(__to_destroy.cbefore_begin(),
-                                           _M_base(), __old);
+                                           *this, __old);
                  __x = __old;
                  _GLIBCXX20_ONLY( __removed++ );
                }
@@ -777,7 +776,7 @@ namespace __debug
                  this->_M_invalidate_if([__next](_Base_const_iterator __it)
                                         { return __it == __next; });
                  __to_destroy.splice_after(__to_destroy.cbefore_begin(),
-                                           _M_base(), __first);
+                                           *this, __first);
                  __next = __first;
                  _GLIBCXX20_ONLY( __removed++ );
                }
@@ -804,7 +803,7 @@ namespace __debug
              return __it != __list._M_base().cbefore_begin()
                     && __it != __list._M_base().cend();
            });
-         _Base::merge(std::move(__list._M_base()));
+         _Base::merge(std::move(__list));
        }
       }
 
@@ -827,7 +826,7 @@ namespace __debug
                return __it != __list._M_base().cbefore_begin()
                       && __it != __list._M_base().cend();
              });
-           _Base::merge(std::move(__list._M_base()), __comp);
+           _Base::merge(std::move(__list), __comp);
          }
        }
 
index f40ebc8..383482c 100644 (file)
@@ -122,8 +122,8 @@ namespace __debug
        noexcept(
          std::is_nothrow_constructible<_Base,
            _Base, const allocator_type&>::value )
-      : _Safe(std::move(__x._M_safe()), __a),
-       _Base(std::move(__x._M_base()), __a) { }
+      : _Safe(std::move(__x), __a),
+       _Base(std::move(__x), __a) { }
 #endif
 
       explicit
@@ -172,7 +172,7 @@ namespace __debug
       operator=(initializer_list<value_type> __l)
       {
        this->_M_invalidate_all();
-       _M_base() = __l;
+       _Base::operator=(__l);
        return *this;
       }
 
@@ -583,7 +583,7 @@ namespace __debug
                              _M_message(__gnu_debug::__msg_self_splice)
                              ._M_sequence(*this, "this"));
        this->_M_transfer_from_if(__x, _Not_equal(__x._M_base().end()));
-       _Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()));
+       _Base::splice(__position.base(), _GLIBCXX_MOVE(__x));
       }
 
 #if __cplusplus >= 201103L
@@ -614,7 +614,7 @@ namespace __debug
        // _GLIBCXX_RESOLVE_LIB_DEFECTS
        // 250. splicing invalidates iterators
        this->_M_transfer_from_if(__x, _Equal(__i.base()));
-       _Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()),
+       _Base::splice(__position.base(), _GLIBCXX_MOVE(__x),
                      __i.base());
       }
 
@@ -662,7 +662,7 @@ namespace __debug
            this->_M_transfer_from_if(__x, _Equal(__tmp));
          }
 
-       _Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()),
+       _Base::splice(__position.base(), _GLIBCXX_MOVE(__x),
                      __first.base(), __last.base());
       }
 
@@ -709,7 +709,7 @@ namespace __debug
                // 526. Is it undefined if a function in the standard changes
                // in parameters?
                this->_M_invalidate_if(_Equal(__first));
-               __to_destroy.splice(__to_destroy.begin(), _M_base(), __first);
+               __to_destroy.splice(__to_destroy.begin(), *this, __first);
 #if !_GLIBCXX_USE_CXX11_ABI
                _GLIBCXX20_ONLY( __removed++ );
 #endif
@@ -743,7 +743,7 @@ namespace __debug
            if (__pred(*__x))
              {
                this->_M_invalidate_if(_Equal(__x));
-               __to_destroy.splice(__to_destroy.begin(), _M_base(), __x);
+               __to_destroy.splice(__to_destroy.begin(), *this, __x);
 #if !_GLIBCXX_USE_CXX11_ABI
                _GLIBCXX20_ONLY( __removed++ );
 #endif
@@ -780,7 +780,7 @@ namespace __debug
          if (*__first == *__next)
            {
              this->_M_invalidate_if(_Equal(__next));
-             __to_destroy.splice(__to_destroy.begin(), _M_base(), __next);
+             __to_destroy.splice(__to_destroy.begin(), *this, __next);
              __next = __first;
 #if !_GLIBCXX_USE_CXX11_ABI
              _GLIBCXX20_ONLY( __removed++ );
@@ -818,7 +818,7 @@ namespace __debug
            if (__binary_pred(*__first, *__next))
              {
                this->_M_invalidate_if(_Equal(__next));
-               __to_destroy.splice(__to_destroy.begin(), _M_base(), __next);
+               __to_destroy.splice(__to_destroy.begin(), *this, __next);
                __next = __first;
 #if !_GLIBCXX_USE_CXX11_ABI
                _GLIBCXX20_ONLY( __removed++ );
@@ -851,7 +851,7 @@ namespace __debug
            __glibcxx_check_sorted(_Base::begin(), _Base::end());
            __glibcxx_check_sorted(__x.begin().base(), __x.end().base());
            this->_M_transfer_from_if(__x, _Not_equal(__x._M_base().end()));
-           _Base::merge(_GLIBCXX_MOVE(__x._M_base()));
+           _Base::merge(_GLIBCXX_MOVE(__x));
          }
       }
 
@@ -878,7 +878,7 @@ namespace __debug
              __glibcxx_check_sorted_pred(__x.begin().base(), __x.end().base(),
                                          __comp);
              this->_M_transfer_from_if(__x, _Not_equal(__x._M_base().end()));
-             _Base::merge(_GLIBCXX_MOVE(__x._M_base()), __comp);
+             _Base::merge(_GLIBCXX_MOVE(__x), __comp);
            }
        }
 
index 3883c54..c62f0b5 100644 (file)
@@ -118,9 +118,9 @@ namespace __debug
       : _Base(__m, __a) { }
 
       map(map&& __m, const __type_identity_t<allocator_type>& __a)
-      noexcept( noexcept(_Base(std::move(__m._M_base()), __a)) )
-      : _Safe(std::move(__m._M_safe()), __a),
-       _Base(std::move(__m._M_base()), __a) { }
+      noexcept( noexcept(_Base(std::move(__m), __a)) )
+      : _Safe(std::move(__m), __a),
+       _Base(std::move(__m), __a) { }
 
       map(initializer_list<value_type> __l, const allocator_type& __a)
       : _Base(__l, __a) { }
@@ -162,7 +162,7 @@ namespace __debug
       map&
       operator=(initializer_list<value_type> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
index 073c1c3..5f0f1fa 100644 (file)
@@ -119,9 +119,9 @@ namespace __debug
       : _Base(__m, __a) { }
 
       multimap(multimap&& __m, const __type_identity_t<allocator_type>& __a)
-      noexcept( noexcept(_Base(std::move(__m._M_base()), __a)) )
-      : _Safe(std::move(__m._M_safe()), __a),
-       _Base(std::move(__m._M_base()), __a) { }
+      noexcept( noexcept(_Base(std::move(__m), __a)) )
+      : _Safe(std::move(__m), __a),
+       _Base(std::move(__m), __a) { }
 
       multimap(initializer_list<value_type> __l, const allocator_type& __a)
       : _Base(__l, __a) { }
@@ -162,7 +162,7 @@ namespace __debug
       multimap&
       operator=(initializer_list<value_type> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
index 479411d..7729fc1 100644 (file)
@@ -118,9 +118,9 @@ namespace __debug
       : _Base(__m, __a) { }
 
       multiset(multiset&& __m, const __type_identity_t<allocator_type>& __a)
-      noexcept( noexcept(_Base(std::move(__m._M_base()), __a)) )
-      : _Safe(std::move(__m._M_safe()), __a),
-       _Base(std::move(__m._M_base()), __a) { }
+      noexcept( noexcept(_Base(std::move(__m), __a)) )
+      : _Safe(std::move(__m), __a),
+       _Base(std::move(__m), __a) { }
 
       multiset(initializer_list<value_type> __l, const allocator_type& __a)
        : _Base(__l, __a)
@@ -162,7 +162,7 @@ namespace __debug
       multiset&
       operator=(initializer_list<value_type> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
index 5de55d6..caba37a 100644 (file)
@@ -48,10 +48,6 @@ namespace __gnu_debug
       { return *static_cast<_SafeContainer*>(this); }
 
     protected:
-      _Safe_container&
-      _M_safe() _GLIBCXX_NOEXCEPT
-      { return *this; }
-
 #if __cplusplus >= 201103L
       _Safe_container() = default;
       _Safe_container(const _Safe_container&) = default;
index e35e5c1..39142ae 100644 (file)
@@ -117,9 +117,9 @@ namespace __debug
       : _Base(__x, __a) { }
 
       set(set&& __x, const __type_identity_t<allocator_type>& __a)
-      noexcept( noexcept(_Base(std::move(__x._M_base()), __a)) )
-      : _Safe(std::move(__x._M_safe()), __a),
-       _Base(std::move(__x._M_base()), __a) { }
+      noexcept( noexcept(_Base(std::move(__x), __a)) )
+      : _Safe(std::move(__x), __a),
+       _Base(std::move(__x), __a) { }
 
       set(initializer_list<value_type> __l, const allocator_type& __a)
       : _Base(__l, __a) { }
@@ -160,7 +160,7 @@ namespace __debug
       set&
       operator=(initializer_list<value_type> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
index 2209f88..dd16527 100644 (file)
@@ -160,8 +160,8 @@ namespace __gnu_debug
       basic_string(basic_string&& __s, const _Allocator& __a)
       noexcept(
        std::is_nothrow_constructible<_Base, _Base, const _Allocator&>::value )
-      : _Safe(std::move(__s._M_safe()), __a),
-       _Base(std::move(__s._M_base()), __a)
+      : _Safe(std::move(__s), __a),
+       _Base(std::move(__s), __a)
       { }
 
       ~basic_string() = default;
@@ -213,7 +213,7 @@ namespace __gnu_debug
       operator=(const _CharT* __s)
       {
        __glibcxx_check_string(__s);
-       _M_base() = __s;
+       _Base::operator=(__s);
        this->_M_invalidate_all();
        return *this;
       }
@@ -221,7 +221,7 @@ namespace __gnu_debug
       basic_string&
       operator=(_CharT __c)
       {
-       _M_base() = __c;
+       _Base::operator=(__c);
        this->_M_invalidate_all();
        return *this;
       }
@@ -230,7 +230,7 @@ namespace __gnu_debug
       basic_string&
       operator=(std::initializer_list<_CharT> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
@@ -341,7 +341,7 @@ namespace __gnu_debug
                              ._M_sequence(*this, "this")
                              ._M_integer(__pos, "__pos")
                              ._M_integer(this->size(), "size"));
-       return _M_base()[__pos];
+       return _Base::operator[](__pos);
       }
 
       reference
@@ -357,7 +357,7 @@ namespace __gnu_debug
                              ._M_integer(__pos, "__pos")
                              ._M_integer(this->size(), "size"));
 #endif
-       return _M_base()[__pos];
+       return _Base::operator[](__pos);
       }
 
       using _Base::at;
@@ -371,7 +371,7 @@ namespace __gnu_debug
       basic_string&
       operator+=(const basic_string& __str)
       {
-       _M_base() += __str;
+       _Base::operator+=(__str);
        this->_M_invalidate_all();
        return *this;
       }
@@ -380,7 +380,7 @@ namespace __gnu_debug
       operator+=(const _CharT* __s)
       {
        __glibcxx_check_string(__s);
-       _M_base() += __s;
+       _Base::operator+=(__s);
        this->_M_invalidate_all();
        return *this;
       }
@@ -388,7 +388,7 @@ namespace __gnu_debug
       basic_string&
       operator+=(_CharT __c)
       {
-       _M_base() += __c;
+       _Base::operator+=(__c);
        this->_M_invalidate_all();
        return *this;
       }
@@ -397,7 +397,7 @@ namespace __gnu_debug
       basic_string&
       operator+=(std::initializer_list<_CharT> __l)
       {
-       _M_base() += __l;
+       _Base::operator+=(__l);
        this->_M_invalidate_all();
        return *this;
       }
index d6e184a..64cc8ba 100644 (file)
@@ -150,9 +150,9 @@ namespace __debug
 
       unordered_map(unordered_map&& __umap,
                    const allocator_type& __a)
-      noexcept( noexcept(_Base(std::move(__umap._M_base()), __a)) )
-      : _Safe(std::move(__umap._M_safe()), __a),
-       _Base(std::move(__umap._M_base()), __a) { }
+      noexcept( noexcept(_Base(std::move(__umap), __a)) )
+      : _Safe(std::move(__umap), __a),
+       _Base(std::move(__umap), __a) { }
 
       unordered_map(initializer_list<value_type> __l,
                    size_type __n = 0,
@@ -210,7 +210,7 @@ namespace __debug
       unordered_map&
       operator=(initializer_list<value_type> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
@@ -561,7 +561,7 @@ namespace __debug
        {
          auto __guard
            = _Safe::_S_uc_guard(std::__detail::_Select1st{}, __source);
-         _Base::merge(__source._M_base());
+         _Base::merge(__source);
        }
 
       template<typename _H2, typename _P2>
@@ -575,7 +575,7 @@ namespace __debug
        {
          auto __guard
            = _Safe::_S_umc_guard(std::__detail::_Select1st{}, __source);
-         _Base::merge(__source._M_base());
+         _Base::merge(__source);
        }
 
       template<typename _H2, typename _P2>
@@ -953,9 +953,9 @@ namespace __debug
 
       unordered_multimap(unordered_multimap&& __umap,
                         const allocator_type& __a)
-      noexcept( noexcept(_Base(std::move(__umap._M_base()), __a)) )
-      : _Safe(std::move(__umap._M_safe()), __a),
-       _Base(std::move(__umap._M_base()), __a) { }
+      noexcept( noexcept(_Base(std::move(__umap), __a)) )
+      : _Safe(std::move(__umap), __a),
+       _Base(std::move(__umap), __a) { }
 
       unordered_multimap(initializer_list<value_type> __l,
                         size_type __n = 0,
@@ -1010,7 +1010,7 @@ namespace __debug
       unordered_multimap&
       operator=(initializer_list<value_type> __l)
       {
-       this->_M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
@@ -1270,7 +1270,7 @@ namespace __debug
        {
          auto __guard
            = _Safe::_S_umc_guard(std::__detail::_Select1st{}, __source);
-         _Base::merge(__source._M_base());
+         _Base::merge(__source);
        }
 
       template<typename _H2, typename _P2>
@@ -1284,7 +1284,7 @@ namespace __debug
        {
          auto __guard
            = _Safe::_S_uc_guard(std::__detail::_Select1st{}, __source);
-         _Base::merge(__source._M_base());
+         _Base::merge(__source);
        }
 
       template<typename _H2, typename _P2>
index 7dc91fa..3516af4 100644 (file)
@@ -146,9 +146,9 @@ namespace __debug
 
       unordered_set(unordered_set&& __uset,
                    const allocator_type& __a)
-      noexcept( noexcept(_Base(std::move(__uset._M_base()), __a)) )
-      : _Safe(std::move(__uset._M_safe()), __a),
-       _Base(std::move(__uset._M_base()), __a) { }
+      noexcept( noexcept(_Base(std::move(__uset), __a)) )
+      : _Safe(std::move(__uset), __a),
+       _Base(std::move(__uset), __a) { }
 
       unordered_set(initializer_list<value_type> __l,
                    size_type __n = 0,
@@ -203,7 +203,7 @@ namespace __debug
       unordered_set&
       operator=(initializer_list<value_type> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
@@ -448,7 +448,7 @@ namespace __debug
        {
          auto __guard
            = _Safe::_S_uc_guard(std::__detail::_Identity{}, __source);
-         _Base::merge(__source._M_base());
+         _Base::merge(__source);
        }
 
       template<typename _H2, typename _P2>
@@ -462,7 +462,7 @@ namespace __debug
        {
          auto __guard
            = _Safe::_S_umc_guard(std::__detail::_Identity{}, __source);
-         _Base::merge(__source._M_base());
+         _Base::merge(__source);
        }
 
       template<typename _H2, typename _P2>
@@ -819,9 +819,9 @@ namespace __debug
 
       unordered_multiset(unordered_multiset&& __uset,
                         const allocator_type& __a)
-      noexcept( noexcept(_Base(std::move(__uset._M_base()), __a)) )
-      : _Safe(std::move(__uset._M_safe()), __a),
-       _Base(std::move(__uset._M_base()), __a) { }
+      noexcept( noexcept(_Base(std::move(__uset), __a)) )
+      : _Safe(std::move(__uset), __a),
+       _Base(std::move(__uset), __a) { }
 
       unordered_multiset(initializer_list<value_type> __l,
                         size_type __n = 0,
@@ -876,7 +876,7 @@ namespace __debug
       unordered_multiset&
       operator=(initializer_list<value_type> __l)
       {
-       this->_M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        return *this;
       }
@@ -1116,7 +1116,7 @@ namespace __debug
        {
          auto __guard
            = _Safe::_S_umc_guard(std::__detail::_Identity{}, __source);
-         _Base::merge(__source._M_base());
+         _Base::merge(__source);
        }
 
       template<typename _H2, typename _P2>
@@ -1130,7 +1130,7 @@ namespace __debug
        {
          auto __guard
            = _Safe::_S_uc_guard(std::__detail::_Identity{}, __source);
-         _Base::merge(__source._M_base());
+         _Base::merge(__source);
        }
 
       template<typename _H2, typename _P2>
index b532a16..ed10e82 100644 (file)
@@ -219,8 +219,8 @@ namespace __debug
       noexcept(
        std::is_nothrow_constructible<_Base,
          _Base, const allocator_type&>::value )
-      : _Safe(std::move(__x._M_safe()), __a),
-       _Base(std::move(__x._M_base()), __a),
+      : _Safe(std::move(__x), __a),
+       _Base(std::move(__x), __a),
        _Safe_vector(std::move(__x)) { }
 
       vector(initializer_list<value_type> __l,
@@ -244,7 +244,7 @@ namespace __debug
       vector&
       operator=(initializer_list<value_type> __l)
       {
-       _M_base() = __l;
+       _Base::operator=(__l);
        this->_M_invalidate_all();
        this->_M_update_guaranteed_capacity();
        return *this;
@@ -440,7 +440,7 @@ namespace __debug
       operator[](size_type __n) _GLIBCXX_NOEXCEPT
       {
        __glibcxx_check_subscript(__n);
-       return _M_base()[__n];
+       return _Base::operator[](__n);
       }
 
       _GLIBCXX_NODISCARD
@@ -448,7 +448,7 @@ namespace __debug
       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
       {
        __glibcxx_check_subscript(__n);
-       return _M_base()[__n];
+       return _Base::operator[](__n);
       }
 
       using _Base::at;