Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Go to the documentation of this file.
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
static pointer allocate(Alloc &a, size_type n)
void allocator_copy_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
#define __TBB_FORWARDING_REF(A)
static void destroy(Alloc &, T *p)
void allocator_move_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
allocator_type::value_type value_type
Alloc::template rebind< U >::other other
tbb::internal::true_type traits_true_type
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2, __TBB_FORWARDING_REF(T3) t3)
void allocator_swap(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
void swap(atomic< T > &lhs, atomic< T > &rhs)
tbb::internal::false_type propagate_on_container_copy_assignment
allocator_type::difference_type difference_type
tbb::internal::false_type traits_false_type
static void construct(Alloc &, PT *p)
tbb::internal::false_type propagate_on_container_move_assignment
allocator_traits< Alloc >::template rebind_alloc< T >::other type
void move(tbb_thread &t1, tbb_thread &t2)
static Alloc select_on_container_copy_construction(const Alloc &a)
static void deallocate(Alloc &a, pointer p, size_type n)
allocator_type::pointer pointer
allocator_type::size_type size_type
tbb::internal::false_type propagate_on_container_swap
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2)
bool_constant< true > true_type
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
allocator_type::const_pointer const_pointer
bool_constant< false > false_type
void const char const char int ITT_FORMAT __itt_group_sync p
static void construct(Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1)
Copyright © 2005-2020 Intel Corporation. All Rights Reserved.
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.