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() _GLIBCXX_NOEXCEPT
49 {
return *
static_cast<_SafeContainer*
>(
this); }
52#if __cplusplus >= 201103L
67 if (__x._M_cont().get_allocator() == __a)
69 else if (!std::__is_constant_evaluated())
70 __x._M_invalidate_all();
86 if (!std::__is_constant_evaluated())
87 this->_M_invalidate_all();
91#if __cplusplus >= 201103L
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();
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());
__bool_constant< true > true_type
The type used as a compile-time boolean with true value.
__bool_constant< false > false_type
The type used as a compile-time boolean with false value.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
GNU debug classes for public use.
typename __detected_or_t< is_empty< _Alloc >, __equal, _Alloc >::type is_always_equal
Whether all instances of the allocator type compare equal.
Safe class dealing with some allocator dependent operations.
Uniform interface to C++98 and C++11 allocators.