42 :
public _SafeBase<_SafeContainer>
44 typedef _SafeBase<_SafeContainer> _Base;
47 _M_cont() _GLIBCXX_NOEXCEPT
48 {
return *
static_cast<_SafeContainer*
>(
this); }
51#if __cplusplus >= 201103L
52 _Safe_container() =
default;
53 _Safe_container(
const _Safe_container&) =
default;
54 _Safe_container(_Safe_container&&) =
default;
57 _Safe_container(_Safe_container&& __x,
const _Alloc&,
std::true_type)
61 _Safe_container(_Safe_container&& __x,
const _Alloc& __a,
std::false_type)
64 if (__x._M_cont().get_allocator() == __a)
67 __x._M_invalidate_all();
71 _Safe_container(_Safe_container&& __x,
const _Alloc& __a)
79 operator=(
const _Safe_container&) _GLIBCXX_NOEXCEPT
81 this->_M_invalidate_all();
85#if __cplusplus >= 201103L
87 operator=(_Safe_container&& __x)
noexcept
94 this->_M_invalidate_all();
98 if (_IsCxx11AllocatorAware)
102 bool __xfer_memory = _Alloc_traits::_S_propagate_on_move_assign()
103 || _M_cont().get_allocator() == __x._M_cont().get_allocator();
107 this->_M_invalidate_all();
112 __x._M_invalidate_all();
117 _M_swap(_Safe_container& __x)
noexcept
119 if (_IsCxx11AllocatorAware)
123 if (!_Alloc_traits::_S_propagate_on_swap())
124 __glibcxx_check_equal_allocs(this->_M_cont()._M_base(),
125 __x._M_cont()._M_base());