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;
47 _M_cont() _GLIBCXX_NOEXCEPT
48 {
return *
static_cast<_SafeContainer*
>(
this); }
52 _M_safe() _GLIBCXX_NOEXCEPT
55 #if __cplusplus >= 201103L 60 { _Base::_M_swap(__x); }
66 if (__x._M_cont().get_allocator() == __a)
69 __x._M_invalidate_all();
78 this->_M_invalidate_all();
82 #if __cplusplus >= 201103L 86 __glibcxx_check_self_move_assign(__x);
88 if (_IsCxx11AllocatorAware)
92 bool __xfer_memory = _Alloc_traits::_S_propagate_on_move_assign()
93 || _M_cont().get_allocator() == __x._M_cont().get_allocator();
97 this->_M_invalidate_all();
102 __x._M_invalidate_all();
109 if (_IsCxx11AllocatorAware)
113 if (!_Alloc_traits::_S_propagate_on_swap())
114 __glibcxx_check_equal_allocs(this->_M_cont()._M_base(),
115 __x._M_cont()._M_base());
Safe class dealing with some allocator dependent operations.
GNU debug classes for public use.
Uniform interface to C++98 and C++0x allocators.