Lines Matching refs:Traits
54 template <typename T, typename Traits> struct sz_allocator {
67 sz_allocator(const sz_allocator<U, Traits> &) : Current() {} in sz_allocator()
87 template <class U> struct rebind { typedef sz_allocator<U, Traits> other; };
94 typename Traits::allocator_type current() { in current()
95 if (!Traits::cache_allocator) { in current()
97 return Traits::current(); in current()
100 Current = Traits::current(); in current()
102 assert(Current == Traits::current()); in current()
105 static void init() { Traits::init(); } in init()
107 typename Traits::allocator_type Current;
110 template <class Traits> struct sz_allocator_scope {
111 explicit sz_allocator_scope(typename Traits::manager_type *Manager) { in sz_allocator_scope()
112 Traits::set_current(Manager); in sz_allocator_scope()
115 ~sz_allocator_scope() { Traits::set_current(nullptr); } in ~sz_allocator_scope()
118 template <typename T, typename U, typename Traits>
119 inline bool operator==(const sz_allocator<T, Traits> &,
120 const sz_allocator<U, Traits> &) {
124 template <typename T, typename U, typename Traits>
125 inline bool operator!=(const sz_allocator<T, Traits> &,
126 const sz_allocator<U, Traits> &) {