17 #ifndef __TBB_allocator_traits_H 18 #define __TBB_allocator_traits_H 20 #include "../tbb_stddef.h" 22 #if __TBB_ALLOCATOR_TRAITS_PRESENT 26 #if __TBB_CPP11_RVALUE_REF_PRESENT 31 #include __TBB_STD_SWAP_HEADER 38 #if __TBB_ALLOCATOR_TRAITS_PRESENT 48 template <
typename MyAlloc,
typename OtherAlloc>
50 my_allocator = other_allocator;
52 template <
typename MyAlloc,
typename OtherAlloc>
55 #if __TBB_CPP11_RVALUE_REF_PRESENT 56 template <
typename MyAlloc,
typename OtherAlloc>
60 my_allocator =
std::move(other_allocator);
62 template <
typename MyAlloc,
typename OtherAlloc>
68 template <
typename MyAlloc,
typename OtherAlloc>
71 swap(my_allocator, other_allocator);
73 template <
typename MyAlloc,
typename OtherAlloc>
76 #if __TBB_ALLOCATOR_TRAITS_PRESENT 77 using std::allocator_traits;
79 template<
typename Alloc>
93 typedef typename allocator_type::pointer
pointer;
96 typedef typename allocator_type::size_type
size_type;
99 typedef typename Alloc::template rebind<U>::other
other;
103 return a.allocate(n);
110 template<
typename PT>
112 ::new (static_cast<void*>(
p)) PT();
115 template<
typename PT,
typename T1>
117 ::new (static_cast<void*>(
p)) PT(tbb::internal::forward<T1>(t1));
120 template<
typename PT,
typename T1,
typename T2>
122 ::new (static_cast<void*>(
p)) PT(tbb::internal::forward<T1>(t1), tbb::internal::forward<T2>(t2));
125 template<
typename PT,
typename T1,
typename T2,
typename T3>
128 ::new (static_cast<void*>(
p)) PT(tbb::internal::forward<T1>(t1), tbb::internal::forward<T2>(t2),
129 tbb::internal::forward<T3>(t3));
140 #endif // __TBB_ALLOCATOR_TRAITS_PRESENT 144 template<
typename Alloc,
typename T>
146 #if __TBB_ALLOCATOR_TRAITS_PRESENT 155 #endif // __TBB_allocator_traits_H bool_constant< true > true_type
void allocator_swap(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
tbb::internal::true_type traits_true_type
allocator_type::value_type value_type
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1)
tbb::internal::false_type propagate_on_container_swap
void allocator_move_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2, __TBB_FORWARDING_REF(T3) t3)
bool_constant< false > false_type
allocator_traits< Alloc >::template rebind_alloc< T >::other type
static void construct(Alloc &, PT *p)
static pointer allocate(Alloc &a, size_type n)
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
allocator_type::size_type size_type
void allocator_copy_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
tbb::internal::false_type propagate_on_container_copy_assignment
static Alloc select_on_container_copy_construction(const Alloc &a)
void const char const char int ITT_FORMAT __itt_group_sync p
Alloc::template rebind< U >::other other
allocator_type::const_pointer const_pointer
tbb::internal::false_type propagate_on_container_move_assignment
static void deallocate(Alloc &a, pointer p, size_type n)
allocator_type::pointer pointer
void swap(atomic< T > &lhs, atomic< T > &rhs)
static void destroy(Alloc &, T *p)
#define __TBB_FORWARDING_REF(A)
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2)
allocator_type::difference_type difference_type
tbb::internal::false_type traits_false_type
void move(tbb_thread &t1, tbb_thread &t2)