42 :
public _SafeBase<_SafeContainer>
44 typedef _SafeBase<_SafeContainer> _Base;
48 _M_cont()
const _GLIBCXX_NOEXCEPT
49 {
return *
static_cast<const _SafeContainer*
>(
this); }
52#if __cplusplus >= 201103L
53 _Safe_container() =
default;
54 _Safe_container(
const _Safe_container&) =
default;
55 _Safe_container(_Safe_container&&) =
default;
60 _M_swap_base(
const _Safe_container& __x)
const noexcept
61 { _Base::_M_swap(__x); }
64 _Safe_container(_Safe_container&& __x,
const _Alloc&,
std::true_type)
69 _Safe_container(_Safe_container&& __x,
const _Alloc& __a,
std::false_type)
72 if (!std::__is_constant_evaluated())
74 if (__x._M_cont().get_allocator() == __a)
77 __x._M_invalidate_all();
83 _Safe_container(_Safe_container&& __x,
const _Alloc& __a)
92 operator=(
const _Safe_container&) _GLIBCXX_NOEXCEPT
94 if (!std::__is_constant_evaluated())
95 this->_M_invalidate_all();
99#if __cplusplus >= 201103L
102 operator=(_Safe_container&& __x)
noexcept
104 if (std::__is_constant_evaluated())
112 this->_M_invalidate_all();
116 if (_IsCxx11AllocatorAware)
120 bool __xfer_memory = _Alloc_traits::_S_propagate_on_move_assign()
121 || _M_cont().get_allocator() == __x._M_cont().get_allocator();
125 this->_M_invalidate_all();
130 __x._M_invalidate_all();
136 _M_swap(
const _Safe_container& __x)
const noexcept
138 if (_IsCxx11AllocatorAware)
142 if (!_Alloc_traits::_S_propagate_on_swap())
143 __glibcxx_check_equal_allocs(this->_M_cont()._M_base(),
144 __x._M_cont()._M_base());
151 _M_swap(
const _Safe_container& __x)
const throw()
152 { _Base::_M_swap(__x); }