29 #ifndef _GLIBCXX_DEBUG_SAFE_CONTAINER_H
30 #define _GLIBCXX_DEBUG_SAFE_CONTAINER_H 1
37 template<
typename _SafeContainer,
39 template<
typename>
class _SafeBase,
40 bool _IsCxx11AllocatorAware =
true>
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
61 { _Base::_M_swap(__x); }
72 if (!std::__is_constant_evaluated())
74 if (__x._M_cont().get_allocator() == __a)
77 __x._M_invalidate_all();
89 #if __cplusplus < 201103L
93 _Base::operator=(__x);
99 { _Base::_M_swap(__x); }
109 if (std::__is_constant_evaluated())
117 this->_M_invalidate_all();
121 if (_IsCxx11AllocatorAware)
125 bool __xfer_memory = _Alloc_traits::_S_propagate_on_move_assign()
126 || _M_cont().get_allocator() == __x._M_cont().get_allocator();
130 this->_M_invalidate_all();
135 __x._M_invalidate_all();
143 if (_IsCxx11AllocatorAware)
147 if (!_Alloc_traits::_S_propagate_on_swap())
148 __glibcxx_check_equal_allocs(this->_M_cont()._M_base(),
149 __x._M_cont()._M_base());