STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Typedefs | Functions
xmemory0 File Reference
#include <cstdint>
#include <cstdlib>
#include <limits>
#include <new>
#include <xutility>
#include <xatomic0.h>
#include <xatomic.h>

Classes

struct  _Is_simple_alloc< _Alty >
 
struct  _Simple_types< _Value_type >
 
struct  _Get_voidptr< _Alty, _Pointer >
 
struct  _Get_voidptr< _Alty, _Ty * >
 
struct  _Get_first_parameter< _Ty >
 
struct  _Get_first_parameter< _Ty< _First, _Rest...> >
 
struct  _Replace_first_parameter< _Newfirst, _Ty >
 
struct  _Replace_first_parameter< _Newfirst, _Ty< _First, _Rest...> >
 
struct  pointer_traits< _Ty >
 
struct  pointer_traits< _Ty * >
 
class  allocator< _Ty >
 
struct  _Wrap_alloc< _Alloc >
 
struct  _Unwrap_alloc< _Alloc >
 
struct  _Unwrap_alloc< _Wrap_alloc< _Alloc > >
 
struct  _Is_default_allocator< _Alloc, class >
 
struct  _Is_default_allocator< allocator< _Ty >, typename allocator< _Ty >::_Not_user_specialized >
 
struct  _Alloc_allocate
 
struct  _Has_no_alloc_construct_tag
 
struct  _Has_no_alloc_construct< _Void, _Types >
 
struct  _Has_no_alloc_construct< void_t< _Has_no_alloc_construct_tag, decltype(_STD declval< _Alloc & >().construct(_STD declval< _Ptr >(), _STD declval< _Args >()...))>, _Alloc, _Ptr, _Args...>
 
struct  _Has_no_alloc_destroy_tag
 
struct  _Has_no_alloc_destroy< _Alloc, _Ptr, class >
 
struct  _Has_no_alloc_destroy< _Alloc, _Ptr, void_t< _Has_no_alloc_destroy_tag, decltype(_STD declval< _Alloc & >().destroy(_STD declval< _Ptr >()))> >
 
struct  _Alloc_max_size
 
struct  _Alloc_select
 
struct  allocator_traits< _Alloc >
 
class  allocator< _Ty >
 
struct  allocator< _Ty >::rebind< _Other >
 
class  allocator< void >
 
struct  allocator< void >::rebind< _Other >
 
struct  allocator_traits< allocator< _Ty > >
 
struct  _Wrap_alloc< _Alloc >
 
struct  _Wrap_alloc< _Alloc >::rebind< _Other >
 

Macros

#define _XMEMORY0_
 
#define _DECLSPEC_ALLOCATOR   __declspec(allocator)
 
#define _BIG_ALLOCATION_THRESHOLD   4096
 
#define _BIG_ALLOCATION_ALIGNMENT   32
 
#define _NON_USER_SIZE   (sizeof(void *) + _BIG_ALLOCATION_ALIGNMENT - 1)
 
#define _MT_INCR(x)   _Inc_atomic_counter_explicit(x, memory_order_relaxed)
 
#define _MT_DECR(x)   _Dec_atomic_counter_explicit(x, memory_order_acq_rel)
 

Typedefs

template<class _Alloc >
using _Unwrap_alloc_t = typename _Unwrap_alloc< _Alloc >::type
 
template<class _Alloc , class _Ptr , class... _Args>
using _Uses_default_construct = disjunction< _Is_default_allocator< _Alloc >, _Has_no_alloc_construct< void, _Alloc, _Ptr, _Args...>>
 
template<class _Alloc , class _Ptr , class... _Args>
using _Uses_default_construct_t = typename _Uses_default_construct< _Alloc, _Ptr, _Args...>::type
 
template<class _Alloc , class _Ptr >
using _Uses_default_destroy = disjunction< _Is_default_allocator< _Alloc >, _Has_no_alloc_destroy< _Alloc, _Ptr >>
 
template<class _Alloc , class _Ptr >
using _Uses_default_destroy_t = typename _Uses_default_destroy< _Alloc, _Ptr >::type
 

Functions

_DECLSPEC_ALLOCATOR void_Allocate (size_t _Count, size_t _Sz, bool _Try_aligned_allocation=true)
 
void _Deallocate (void *_Ptr, size_t _Count, size_t _Sz)
 
template<class _Ty1 , class _Ty2 >
void _Construct (_Ty1 *_Ptr, _Ty2 &&_Val)
 
template<class _Ty1 >
void _Construct (_Ty1 *_Ptr)
 
template<class _Ty >
struct _Get_element_type _GET_TYPE_OR_DEFAULT (element_type, typename _Get_first_parameter< _Uty >::type)
 
template<class _Ty >
struct _Get_ptr_difference_type _GET_TYPE_OR_DEFAULT (difference_type, ptrdiff_t)
 
template<class _Ty , class _Other >
struct _Get_rebind_type _GET_TYPE_OR_DEFAULT (template rebind< _Other >::other, typename _Replace_first_parameter< _Other _COMMA _Uty >::type)
 
template<class _Ptrty >
void _Destroy (_Ptrty _Ptr)
 
template<class _Ptrty >
auto _Const_cast (_Ptrty _Ptr)
 
template<class _Ty >
auto _Const_cast (_Ty *_Ptr)
 
template<class _Ty >
struct _Get_pointer_type _GET_TYPE_OR_DEFAULT (pointer, typename _Ty::value_type *)
 
template<class _Ty >
struct _Get_const_pointer_type _GET_TYPE_OR_DEFAULT (const_pointer, typename pointer_traits< typename _Get_pointer_type< _Ty >::type >::template rebind< const typename _Ty::value_type >)
 
template<class _Ty >
struct _Get_void_pointer_type _GET_TYPE_OR_DEFAULT (void_pointer, typename pointer_traits< typename _Get_pointer_type< _Ty >::type >::template rebind< void >)
 
template<class _Ty >
struct _Get_const_void_pointer_type _GET_TYPE_OR_DEFAULT (const_void_pointer, typename pointer_traits< typename _Get_pointer_type< _Ty >::type >::template rebind< const void >)
 
template<class _Ty >
struct _Get_difference_type _GET_TYPE_OR_DEFAULT (difference_type, typename _Get_ptr_difference_type< typename _Get_pointer_type< _Ty >::type >::type)
 
template<class _Ty >
struct _Get_size_type _GET_TYPE_OR_DEFAULT (size_type, typename make_unsigned< typename _Get_difference_type< _Ty >::type >::type)
 
template<class _Ty >
struct _Get_propagate_on_container_copy _GET_TYPE_OR_DEFAULT (propagate_on_container_copy_assignment, false_type)
 
template<class _Ty >
struct _Get_propagate_on_container_move _GET_TYPE_OR_DEFAULT (propagate_on_container_move_assignment, false_type)
 
template<class _Ty >
struct _Get_propagate_on_container_swap _GET_TYPE_OR_DEFAULT (propagate_on_container_swap, false_type)
 
template<class _Ty >
struct _Get_is_always_equal _GET_TYPE_OR_DEFAULT (is_always_equal, typename is_empty< _Ty >::type)
 
template<class _Ty , class _Other >
bool operator== (const allocator< _Ty > &, const allocator< _Other > &) _THROW0()
 
template<class _Ty , class _Other >
bool operator!= (const allocator< _Ty > &_Left, const allocator< _Other > &_Right) _THROW0()
 
template<class _Ty , class _Other >
bool operator== (const _Wrap_alloc< _Ty > &_Left, const _Wrap_alloc< _Other > &_Right) _THROW0()
 
template<class _Ty , class _Other >
bool operator!= (const _Wrap_alloc< _Ty > &_Left, const _Wrap_alloc< _Other > &_Right) _THROW0()
 
template<class _Alty >
void _Pocca (_Alty &_Left, const _Alty &_Right, true_type) _NOEXCEPT
 
template<class _Alty >
void _Pocca (_Alty &, const _Alty &, false_type) _NOEXCEPT
 
template<class _Alty >
void _Pocca (_Alty &_Left, const _Alty &_Right) _NOEXCEPT
 
template<class _Alty >
void _Pocma (_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
 
template<class _Alty >
void _Pocma (_Alty &, _Alty &, false_type) _NOEXCEPT
 
template<class _Alty >
void _Pocma (_Alty &_Left, _Alty &_Right) _NOEXCEPT
 
template<class _Alty >
void _Pocs (_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
 
template<class _Alty >
void _Pocs (_Alty &_Left, _Alty &_Right, false_type) _NOEXCEPT
 
template<class _Alty >
void _Pocs (_Alty &_Left, _Alty &_Right) _NOEXCEPT
 
template<class _Alloc , class _Ptr = typename _Wrap_alloc<_Alloc>::pointer>
void _Destroy_range1 (_Ptr _First, _Ptr _Last, _Wrap_alloc< _Alloc > &_Al, false_type)
 
template<class _Alloc , class _Ptr = typename _Wrap_alloc<_Alloc>::pointer>
void _Destroy_range1 (_Ptr, _Ptr, _Wrap_alloc< _Alloc > &, true_type)
 
template<class _Alloc , class _Ptr = typename _Wrap_alloc<_Alloc>::pointer>
void _Destroy_range (_Ptr _First, _Ptr _Last, _Wrap_alloc< _Alloc > &_Al)
 
template<class _FwdIt >
void _Destroy_range1 (_FwdIt _First, _FwdIt _Last, false_type)
 
template<class _FwdIt >
void _Destroy_range1 (_FwdIt, _FwdIt, true_type)
 
template<class _FwdIt >
void _Destroy_range (_FwdIt _First, _FwdIt _Last)
 

Macro Definition Documentation

#define _BIG_ALLOCATION_ALIGNMENT   32
#define _BIG_ALLOCATION_THRESHOLD   4096
#define _DECLSPEC_ALLOCATOR   __declspec(allocator)
#define _MT_DECR (   x)    _Dec_atomic_counter_explicit(x, memory_order_acq_rel)
#define _MT_INCR (   x)    _Inc_atomic_counter_explicit(x, memory_order_relaxed)
#define _NON_USER_SIZE   (sizeof(void *) + _BIG_ALLOCATION_ALIGNMENT - 1)
#define _XMEMORY0_

Typedef Documentation

template<class _Alloc >
using _Unwrap_alloc_t = typename _Unwrap_alloc<_Alloc>::type
template<class _Alloc , class _Ptr , class... _Args>
using _Uses_default_construct = disjunction< _Is_default_allocator<_Alloc>, _Has_no_alloc_construct<void, _Alloc, _Ptr, _Args...>>
template<class _Alloc , class _Ptr , class... _Args>
using _Uses_default_construct_t = typename _Uses_default_construct<_Alloc, _Ptr, _Args...>::type
template<class _Alloc , class _Ptr >
using _Uses_default_destroy = disjunction< _Is_default_allocator<_Alloc>, _Has_no_alloc_destroy<_Alloc, _Ptr>>
template<class _Alloc , class _Ptr >
using _Uses_default_destroy_t = typename _Uses_default_destroy<_Alloc, _Ptr>::type

Function Documentation

_DECLSPEC_ALLOCATOR void* _Allocate ( size_t  _Count,
size_t  _Sz,
bool  _Try_aligned_allocation = true 
)
inline
48  { // allocate storage for _Count elements of size _Sz
49  void *_Ptr = 0;
50 
51  if (_Count == 0)
52  return (_Ptr);
53 
54  // check overflow of multiply
55  if ((size_t)(-1) / _Sz < _Count)
56  _Xbad_alloc(); // report no memory
57  const size_t _User_size = _Count * _Sz;
58 
59  #if defined(_M_IX86) || defined(_M_X64)
60  if (_Try_aligned_allocation
61  && _BIG_ALLOCATION_THRESHOLD <= _User_size)
62  { // allocate large block
63  static_assert(sizeof (void *) < _BIG_ALLOCATION_ALIGNMENT,
64  "Big allocations should at least match vector register size");
65  const size_t _Block_size = _NON_USER_SIZE + _User_size;
66  if (_Block_size <= _User_size)
67  _Xbad_alloc(); // report no memory
68  const uintptr_t _Ptr_container =
69  reinterpret_cast<uintptr_t>(::operator new(_Block_size));
70  _SCL_SECURE_ALWAYS_VALIDATE(_Ptr_container != 0);
71  _Ptr = reinterpret_cast<void *>((_Ptr_container + _NON_USER_SIZE)
72  & ~(_BIG_ALLOCATION_ALIGNMENT - 1));
73  static_cast<uintptr_t *>(_Ptr)[-1] = _Ptr_container;
74 
75  #ifdef _DEBUG
76  static_cast<uintptr_t *>(_Ptr)[-2] = _BIG_ALLOCATION_SENTINEL;
77  #endif /* _DEBUG */
78  }
79  else
80  #endif /* defined(_M_IX86) || defined(_M_X64) */
81 
82  { // allocate normal block
83  _Ptr = ::operator new(_User_size);
84  _SCL_SECURE_ALWAYS_VALIDATE(_Ptr != 0);
85  }
86  return (_Ptr);
87  }
unsigned int _Count
Definition: xcomplex:668
#define _BIG_ALLOCATION_THRESHOLD
Definition: xmemory0:24
#define _BIG_ALLOCATION_ALIGNMENT
Definition: xmemory0:25
unsigned int uintptr_t
Definition: vadefs.h:30
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xbad_alloc()
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:321
#define _NON_USER_SIZE
Definition: xmemory0:31
template<class _Ptrty >
auto _Const_cast ( _Ptrty  _Ptr)
inline
296  { // remove constness from a fancy pointer
297  using _Elem = typename pointer_traits<_Ptrty>::element_type;
298  using _Modifiable = remove_const_t<_Elem>;
299  using _Dest = typename pointer_traits<_Ptrty>::template rebind<_Modifiable>;
300 
301  return (pointer_traits<_Dest>::pointer_to(const_cast<_Modifiable&>(*_Ptr)));
302  }
typename remove_const< _Ty >::type remove_const_t
Definition: type_traits:1820
_Get_element_type< _Ty >::type element_type
Definition: xmemory0:246
Definition: xmemory0:244
template<class _Ty >
auto _Const_cast ( _Ty *  _Ptr)
inline
306  { // remove constness from a plain pointer
307  return (const_cast<remove_const_t<_Ty> *>(_Ptr));
308  }
typename remove_const< _Ty >::type remove_const_t
Definition: type_traits:1820
template<class _Ty1 , class _Ty2 >
void _Construct ( _Ty1 *  _Ptr,
_Ty2 &&  _Val 
)
inline
139  { // construct object at _Ptr with value _Val
140  void *_Vptr = _Ptr;
141  ::new (_Vptr) _Ty1(_STD forward<_Ty2>(_Val));
142  }
_In_ int _Val
Definition: vcruntime_string.h:62
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1273
template<class _Ty1 >
void _Construct ( _Ty1 *  _Ptr)
inline
146  { // construct object at _Ptr with default value
147  void *_Vptr = _Ptr;
148 
149  ::new (_Vptr) _Ty1();
150  }
void _Deallocate ( void _Ptr,
size_t  _Count,
size_t  _Sz 
)
inline
92  { // deallocate storage for _Count elements of size _Sz
93  #if defined(_M_IX86) || defined(_M_X64)
94  _SCL_SECURE_ALWAYS_VALIDATE(_Count <= (size_t)(-1) / _Sz);
95  const size_t _User_size = _Count * _Sz;
96  if (_BIG_ALLOCATION_THRESHOLD <= _User_size)
97  { // deallocate large block
98  const uintptr_t _Ptr_user = reinterpret_cast<uintptr_t>(_Ptr);
100  (_Ptr_user & (_BIG_ALLOCATION_ALIGNMENT - 1)) == 0);
101  const uintptr_t _Ptr_ptr = _Ptr_user - sizeof(void *);
102  const uintptr_t _Ptr_container =
103  *reinterpret_cast<uintptr_t *>(_Ptr_ptr);
104 
105  #ifdef _DEBUG
106  // If the following asserts, it likely means that we are performing
107  // an aligned delete on memory coming from an unaligned allocation.
109  reinterpret_cast<uintptr_t *>(_Ptr_ptr)[-1] ==
110  _BIG_ALLOCATION_SENTINEL);
111  #endif /* _DEBUG */
112 
113  // Extra paranoia on aligned allocation/deallocation
114  _SCL_SECURE_ALWAYS_VALIDATE(_Ptr_container < _Ptr_user);
115 
116  #ifdef _DEBUG
117  _SCL_SECURE_ALWAYS_VALIDATE(2 * sizeof(void *)
118  <= _Ptr_user - _Ptr_container);
119 
120  #else /* _DEBUG */
121  _SCL_SECURE_ALWAYS_VALIDATE(sizeof(void *)
122  <= _Ptr_user - _Ptr_container);
123  #endif /* _DEBUG */
124 
125  _SCL_SECURE_ALWAYS_VALIDATE(_Ptr_user - _Ptr_container
126  <= _NON_USER_SIZE);
127 
128  _Ptr = reinterpret_cast<void *>(_Ptr_container);
129  }
130  #endif /* defined(_M_IX86) || defined(_M_X64) */
131 
132  ::operator delete(_Ptr);
133  }
unsigned int _Count
Definition: xcomplex:668
#define _BIG_ALLOCATION_THRESHOLD
Definition: xmemory0:24
#define _BIG_ALLOCATION_ALIGNMENT
Definition: xmemory0:25
unsigned int uintptr_t
Definition: vadefs.h:30
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:321
#define _NON_USER_SIZE
Definition: xmemory0:31
template<class _Ptrty >
void _Destroy ( _Ptrty  _Ptr)
inline
288  { // destroy object at _Ptr
289  typedef typename pointer_traits<_Ptrty>::element_type _Ty;
290  _Ptr->~_Ty();
291  }
_Get_element_type< _Ty >::type element_type
Definition: xmemory0:246
template<class _Alloc , class _Ptr = typename _Wrap_alloc<_Alloc>::pointer>
void _Destroy_range ( _Ptr  _First,
_Ptr  _Last,
_Wrap_alloc< _Alloc > &  _Al 
)
inline
1114  { // destroy [_First, _Last), choose optimization
1115  // note that this is an optimization for debug mode codegen;
1116  // in release mode the BE removes all of this
1117  typedef typename _Alloc::value_type _Val;
1118  _Destroy_range1(_First, _Last, _Al, typename conjunction<
1121  }
Definition: type_traits:1085
void _Destroy_range1(_Ptr _First, _Ptr _Last, _Wrap_alloc< _Alloc > &_Al, false_type)
Definition: xmemory0:1098
_In_ int _Val
Definition: vcruntime_string.h:62
Definition: type_traits:628
_FwdIt _Last
Definition: algorithm:1936
Definition: type_traits:1039
template<class _FwdIt >
void _Destroy_range ( _FwdIt  _First,
_FwdIt  _Last 
)
inline
1140  { // destroy [_First, _Last), choose optimization
1141  // note that this is an optimization for debug mode codegen;
1142  // in release mode the BE removes all of this
1144  }
void _Destroy_range1(_Ptr _First, _Ptr _Last, _Wrap_alloc< _Alloc > &_Al, false_type)
Definition: xmemory0:1098
Definition: type_traits:628
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:647
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc , class _Ptr = typename _Wrap_alloc<_Alloc>::pointer>
void _Destroy_range1 ( _Ptr  _First,
_Ptr  _Last,
_Wrap_alloc< _Alloc > &  _Al,
false_type   
)
inline
1099  { // destroy [_First, _Last), no special optimization
1100  for (; _First != _Last; ++_First)
1101  _Al.destroy(_Unfancy(_First));
1102  }
void destroy(_Ty *_Ptr)
Definition: xmemory0:1001
auto _Unfancy(_Ptrty _Ptr)
Definition: xstddef:732
_FwdIt _Last
Definition: algorithm:1936
template<class _Alloc , class _Ptr = typename _Wrap_alloc<_Alloc>::pointer>
void _Destroy_range1 ( _Ptr  ,
_Ptr  ,
_Wrap_alloc< _Alloc > &  ,
true_type   
)
inline
1107  { // destroy [_First, _Last), trivially destructible and default destroy
1108  // nothing to do
1109  }
template<class _FwdIt >
void _Destroy_range1 ( _FwdIt  _First,
_FwdIt  _Last,
false_type   
)
inline
1127  { // destroy [_First, _Last), no special optimization
1128  for (; _First != _Last; ++_First)
1129  _Destroy(_First);
1130  }
void _Destroy(_Ptrty _Ptr)
Definition: xmemory0:287
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt >
void _Destroy_range1 ( _FwdIt  ,
_FwdIt  ,
true_type   
)
inline
1134  { // destroy [_First, _Last), trivially destructible
1135  // nothing to do
1136  }
template<class _Ty >
struct _Get_element_type _GET_TYPE_OR_DEFAULT ( element_type  ,
typename _Get_first_parameter< _Uty >::type   
)
template<class _Ty >
struct _Get_ptr_difference_type _GET_TYPE_OR_DEFAULT ( difference_type  ,
ptrdiff_t   
)
template<class _Ty , class _Other >
struct _Get_rebind_type _GET_TYPE_OR_DEFAULT ( template rebind< _Other >::other  ,
typename _Replace_first_parameter< _Other _COMMA _Uty >::type   
)
template<class _Ty >
struct _Get_size_type _GET_TYPE_OR_DEFAULT ( size_type  ,
typename make_unsigned< typename _Get_difference_type< _Ty >::type >::type   
)
template<class _Ty >
struct _Get_propagate_on_container_copy _GET_TYPE_OR_DEFAULT ( propagate_on_container_copy_assignment  ,
false_type   
)
template<class _Ty >
struct _Get_propagate_on_container_move _GET_TYPE_OR_DEFAULT ( propagate_on_container_move_assignment  ,
false_type   
)
template<class _Ty >
struct _Get_is_always_equal _GET_TYPE_OR_DEFAULT ( is_always_equal  ,
typename is_empty< _Ty >::type   
)
template<class _Ty >
struct _Get_pointer_type _GET_TYPE_OR_DEFAULT ( pointer  ,
typename _Ty::value_type *   
)
template<class _Ty >
struct _Get_propagate_on_container_swap _GET_TYPE_OR_DEFAULT ( propagate_on_container_swap  ,
false_type   
)
template<class _Ty >
struct _Get_const_pointer_type _GET_TYPE_OR_DEFAULT ( const_pointer  ,
typename pointer_traits< typename _Get_pointer_type< _Ty >::type >::template rebind< const typename _Ty::value_type >   
)
template<class _Ty >
struct _Get_void_pointer_type _GET_TYPE_OR_DEFAULT ( void_pointer  ,
typename pointer_traits< typename _Get_pointer_type< _Ty >::type >::template rebind< void  
)
template<class _Ty >
struct _Get_const_void_pointer_type _GET_TYPE_OR_DEFAULT ( const_void_pointer  ,
typename pointer_traits< typename _Get_pointer_type< _Ty >::type >::template rebind< const void  
)
template<class _Ty >
struct _Get_difference_type _GET_TYPE_OR_DEFAULT ( difference_type  ,
typename _Get_ptr_difference_type< typename _Get_pointer_type< _Ty >::type >::type   
)
template<class _Alty >
void _Pocca ( _Alty &  _Left,
const _Alty &  _Right,
true_type   
)
inline
1032  { // propagate on container copy assignment
1033  _Left = _Right;
1034  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alty >
void _Pocca ( _Alty &  ,
const _Alty &  ,
false_type   
)
inline
1038  { // (don't) propagate on container copy assignment
1039  }
template<class _Alty >
void _Pocca ( _Alty &  _Left,
const _Alty &  _Right 
)
inline
1043  { // (maybe) propagate on container copy assignment
1044  typename _Alty::propagate_on_container_copy_assignment _Tag;
1045  _Pocca(_Left, _Right, _Tag);
1046  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
void _Pocca(_Alty &_Left, const _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1031
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alty >
void _Pocma ( _Alty &  _Left,
_Alty &  _Right,
true_type   
)
inline
1051  { // propagate on container move assignment
1052  _Left = _STD move(_Right);
1053  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alty >
void _Pocma ( _Alty &  ,
_Alty &  ,
false_type   
)
inline
1057  { // (don't) propagate on container move assignment
1058  }
template<class _Alty >
void _Pocma ( _Alty &  _Left,
_Alty &  _Right 
)
inline
1062  { // (maybe) propagate on container move assignment
1063  typename _Alty::propagate_on_container_move_assignment _Tag;
1064  _Pocma(_Left, _Right, _Tag);
1065  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
void _Pocma(_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1050
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alty >
void _Pocs ( _Alty &  _Left,
_Alty &  _Right,
true_type   
)
inline
1070  { // propagate on container swap
1072  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:56
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alty >
void _Pocs ( _Alty &  _Left,
_Alty &  _Right,
false_type   
)
inline
1076  { // (don't) propagate on container swap
1077  if (_Left != _Right)
1078  { // containers are incompatible
1079  #if _ITERATOR_DEBUG_LEVEL == 2
1080  _DEBUG_ERROR("containers incompatible for swap");
1081  #else /* ITERATOR_DEBUG_LEVEL == 2 */
1082  _XSTD terminate();
1083  #endif /* ITERATOR_DEBUG_LEVEL == 2 */
1084  }
1085  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
#define _XSTD
Definition: xstddef:21
void __CRTDECL terminate() _NOEXCEPT
Definition: exception:208
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Alty >
void _Pocs ( _Alty &  _Left,
_Alty &  _Right 
)
inline
1089  { // (maybe) propagate on container swap
1090  typename _Alty::propagate_on_container_swap _Tag;
1091  _Pocs(_Left, _Right, _Tag);
1092  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
void _Pocs(_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1069
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty , class _Other >
bool operator!= ( const allocator< _Ty > &  _Left,
const allocator< _Other > &  _Right 
)
inline
803  { // test for allocator inequality
804  return (false);
805  }
template<class _Ty , class _Other >
bool operator!= ( const _Wrap_alloc< _Ty > &  _Left,
const _Wrap_alloc< _Other > &  _Right 
)
inline
1025  { // test for allocator inequality
1026  return (!(_Left == _Right));
1027  }
template<class _Ty , class _Other >
bool operator== ( const allocator< _Ty > &  ,
const allocator< _Other > &   
)
inline
795  { // test for allocator equality
796  return (true);
797  }
template<class _Ty , class _Other >
bool operator== ( const _Wrap_alloc< _Ty > &  _Left,
const _Wrap_alloc< _Other > &  _Right 
)
inline
1016  { // test for allocator equality
1017  return (static_cast<const _Ty&>(_Left)
1018  == static_cast<const _Other&>(_Right));
1019  }