42 :
public _SafeBase<_SafeContainer>
44 typedef _SafeBase<_SafeContainer> _Base;
47 _M_cont() _GLIBCXX_NOEXCEPT
48 {
return *
static_cast<_SafeContainer*
>(
this); }
52 _M_safe() _GLIBCXX_NOEXCEPT
55#if __cplusplus >= 201103L
56 _Safe_container() =
default;
57 _Safe_container(
const _Safe_container&) =
default;
58 _Safe_container(_Safe_container&&) =
default;
60 _Safe_container(_Safe_container&& __x,
const _Alloc& __a)
63 if (__x._M_cont().get_allocator() == __a)
66 __x._M_invalidate_all();
73 operator=(
const _Safe_container&) _GLIBCXX_NOEXCEPT
75 this->_M_invalidate_all();
79#if __cplusplus >= 201103L
81 operator=(_Safe_container&& __x)
noexcept
88 this->_M_invalidate_all();
92 if (_IsCxx11AllocatorAware)
96 bool __xfer_memory = _Alloc_traits::_S_propagate_on_move_assign()
97 || _M_cont().get_allocator() == __x._M_cont().get_allocator();
101 this->_M_invalidate_all();
106 __x._M_invalidate_all();
111 _M_swap(_Safe_container& __x)
noexcept
113 if (_IsCxx11AllocatorAware)
117 if (!_Alloc_traits::_S_propagate_on_swap())
118 __glibcxx_check_equal_allocs(this->_M_cont()._M_base(),
119 __x._M_cont()._M_base());