21 #ifndef __TBB_allocator_traits_H 22 #define __TBB_allocator_traits_H 24 #include "../tbb_stddef.h" 26 #if __TBB_ALLOCATOR_TRAITS_PRESENT 30 #if __TBB_CPP11_RVALUE_REF_PRESENT 35 #include __TBB_STD_SWAP_HEADER 42 #if __TBB_ALLOCATOR_TRAITS_PRESENT 50 #if __TBB_CPP11_RVALUE_REF_PRESENT 51 template <
typename MyAlloc,
typename OtherAlloc>
55 my_allocator =
std::move(other_allocator);
57 template <
typename MyAlloc,
typename OtherAlloc>
63 template <
typename MyAlloc,
typename OtherAlloc>
66 swap(my_allocator, other_allocator);
68 template <
typename MyAlloc,
typename OtherAlloc>
71 #if __TBB_ALLOCATOR_TRAITS_PRESENT 72 using std::allocator_traits;
74 template<
typename Alloc>
88 typedef typename allocator_type::pointer
pointer;
91 typedef typename allocator_type::size_type
size_type;
94 typedef typename Alloc::template rebind<U>::other
other;
105 template<
typename PT>
107 ::new (static_cast<void*>(
p)) PT();
110 template<
typename PT,
typename T1>
112 ::new (static_cast<void*>(
p)) PT(tbb::internal::forward<T1>(t1));
115 template<
typename PT,
typename T1,
typename T2>
117 ::new (static_cast<void*>(
p)) PT(tbb::internal::forward<T1>(t1), tbb::internal::forward<T2>(t2));
120 template<
typename PT,
typename T1,
typename T2,
typename T3>
123 ::new (static_cast<void*>(
p)) PT(tbb::internal::forward<T1>(t1), tbb::internal::forward<T2>(t2),
124 tbb::internal::forward<T3>(t3));
133 #endif // __TBB_ALLOCATOR_TRAITS_PRESENT 137 template<
typename Alloc,
typename T>
139 #if __TBB_ALLOCATOR_TRAITS_PRESENT 148 #endif // __TBB_allocator_traits_H Alloc::template rebind< U >::other other
allocator_type::value_type value_type
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
bool_constant< true > true_type
allocator_traits< Alloc >::template rebind_alloc< T >::other type
tbb::internal::false_type propagate_on_container_swap
void swap(atomic< T > &lhs, atomic< T > &rhs)
static pointer allocate(Alloc &a, size_type n)
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2, __TBB_FORWARDING_REF(T3) t3)
void const char const char int ITT_FORMAT __itt_group_sync p
static void deallocate(Alloc &a, pointer p, size_type n)
allocator_type::size_type size_type
static void construct(Alloc &, PT *p)
tbb::internal::false_type propagate_on_container_move_assignment
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2)
#define __TBB_FORWARDING_REF(A)
tbb::internal::false_type propagate_on_container_copy_assignment
tbb::internal::true_type traits_true_type
allocator_type::const_pointer const_pointer
void allocator_move_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
void move(tbb_thread &t1, tbb_thread &t2)
void allocator_swap(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
tbb::internal::false_type traits_false_type
bool_constant< false > false_type
static void destroy(Alloc &, T *p)
allocator_type::pointer pointer
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1)
allocator_type::difference_type difference_type