42 :
public _SafeBase<_SafeContainer>
44 typedef _SafeBase<_SafeContainer> _Base;
48 _M_cont() _GLIBCXX_NOEXCEPT
49 {
return *
static_cast<_SafeContainer*
>(
this); }
52#if __cplusplus >= 201103L
53 _Safe_container() =
default;
54 _Safe_container(
const _Safe_container&) =
default;
55 _Safe_container(_Safe_container&&) =
default;
59 _Safe_container(_Safe_container&& __x,
const _Alloc&,
std::true_type)
64 _Safe_container(_Safe_container&& __x,
const _Alloc& __a,
std::false_type)
67 if (__x._M_cont().get_allocator() == __a)
69 else if (!std::__is_constant_evaluated())
70 __x._M_invalidate_all();
75 _Safe_container(_Safe_container&& __x,
const _Alloc& __a)
84 operator=(
const _Safe_container&) _GLIBCXX_NOEXCEPT
86 if (!std::__is_constant_evaluated())
87 this->_M_invalidate_all();
91#if __cplusplus >= 201103L
94 operator=(_Safe_container&& __x)
noexcept
96 if (std::__is_constant_evaluated())
104 this->_M_invalidate_all();
108 if (_IsCxx11AllocatorAware)
112 bool __xfer_memory = _Alloc_traits::_S_propagate_on_move_assign()
113 || _M_cont().get_allocator() == __x._M_cont().get_allocator();
117 this->_M_invalidate_all();
122 __x._M_invalidate_all();
128 _M_swap(_Safe_container& __x)
noexcept
130 if (_IsCxx11AllocatorAware)
134 if (!_Alloc_traits::_S_propagate_on_swap())
135 __glibcxx_check_equal_allocs(this->_M_cont()._M_base(),
136 __x._M_cont()._M_base());