tbb::internal::allocator_traits< Alloc > Struct Template Reference

`#include <_allocator_traits.h>`

Inheritance diagram for tbb::internal::allocator_traits< Alloc >:
Collaboration diagram for tbb::internal::allocator_traits< Alloc >:

## Classes

struct | rebind_alloc

## Public Types

typedef tbb::internal::false_type | propagate_on_container_move_assignment
typedef tbb::internal::false_type | propagate_on_container_copy_assignment
typedef tbb::internal::false_type | propagate_on_container_swap
typedef Alloc | allocator_type
typedef allocator_type::value_type | value_type
typedef allocator_type::pointer | pointer
typedef allocator_type::const_pointer | const_pointer
typedef allocator_type::difference_type | difference_type
typedef allocator_type::size_type | size_type

## Static Public Member Functions

static pointer | allocate (Alloc &a, size_type n)
static void | deallocate (Alloc &a, pointer p, size_type n)
template<typename PT >
static void | construct (Alloc &, PT *p)
template<typename PT , typename T1 >
static void | construct (Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1)
template<typename PT , typename T1 , typename T2 >
static void | construct (Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2)
template<typename PT , typename T1 , typename T2 , typename T3 >
static void | construct (Alloc &, PT *p, __TBB_FORWARDING_REF(T1) t1, __TBB_FORWARDING_REF(T2) t2, __TBB_FORWARDING_REF(T3) t3)
template<typename T >
static void | destroy (Alloc &, T *p)
static Alloc | select_on_container_copy_construction (const Alloc &a)

## Detailed Description

### template<typename Alloc>
struct tbb::internal::allocator_traits< Alloc >

Internal allocator_traits implementation, which relies on C++03 standard [20.1.5] allocator requirements

Definition at line 82 of file _allocator_traits.h.

## Member Typedef Documentation

## allocator_type

template<typename Alloc>

typedef Alloc tbb::internal::allocator_traits< Alloc >::allocator_type

Definition at line 90 of file _allocator_traits.h.

## const_pointer

template<typename Alloc>

typedef allocator_type::const_pointer tbb::internal::allocator_traits< Alloc >::const_pointer

Definition at line 94 of file _allocator_traits.h.

## difference_type

template<typename Alloc>

typedef allocator_type::difference_type tbb::internal::allocator_traits< Alloc >::difference_type

Definition at line 95 of file _allocator_traits.h.

## pointer

template<typename Alloc>

typedef allocator_type::pointer tbb::internal::allocator_traits< Alloc >::pointer

Definition at line 93 of file _allocator_traits.h.

## propagate_on_container_copy_assignment

template<typename Alloc>

typedef tbb::internal::false_type tbb::internal::allocator_traits< Alloc >::propagate_on_container_copy_assignment

Definition at line 87 of file _allocator_traits.h.

## propagate_on_container_move_assignment

template<typename Alloc>

typedef tbb::internal::false_type tbb::internal::allocator_traits< Alloc >::propagate_on_container_move_assignment

Definition at line 86 of file _allocator_traits.h.

## propagate_on_container_swap

template<typename Alloc>

typedef tbb::internal::false_type tbb::internal::allocator_traits< Alloc >::propagate_on_container_swap

Definition at line 88 of file _allocator_traits.h.

## size_type

template<typename Alloc>

typedef allocator_type::size_type tbb::internal::allocator_traits< Alloc >::size_type

Definition at line 96 of file _allocator_traits.h.

## value_type

template<typename Alloc>

typedef allocator_type::value_type tbb::internal::allocator_traits< Alloc >::value_type

Definition at line 91 of file _allocator_traits.h.

## Member Function Documentation

## allocate()

template<typename Alloc>

static pointer tbb::internal::allocator_traits< Alloc >::allocate | ( | Alloc & | a,
|  | size_type | n
| ) |  |

inline static

Definition at line 102 of file _allocator_traits.h.

{
return a.allocate(n);
}

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::create_node().

Here is the caller graph for this function:

## construct() [1/4]

template<typename Alloc>
template<typename PT >

static void tbb::internal::allocator_traits< Alloc >::construct | ( | Alloc & | ,
|  | PT * | p
| ) |  |

inline static

Definition at line 111 of file _allocator_traits.h.

{
::new (static_cast<void*>(p)) PT();
}

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::create_node().

Here is the caller graph for this function:

## construct() [2/4]

template<typename Alloc>
template<typename PT , typename T1 >

static void tbb::internal::allocator_traits< Alloc >::construct | ( | Alloc & | ,
|  | PT * | p,
|  | __TBB_FORWARDING_REF(T1) | t1
| ) |  |

inline static

Definition at line 116 of file _allocator_traits.h.

{
::new (static_cast<void*>(p)) PT(tbb::internal::forward<T1>(t1));
}

## construct() [3/4]

template<typename Alloc>
template<typename PT , typename T1 , typename T2 >

static void tbb::internal::allocator_traits< Alloc >::construct | ( | Alloc & | ,
|  | PT * | p,
|  | __TBB_FORWARDING_REF(T1) | t1,
|  | __TBB_FORWARDING_REF(T2) | t2
| ) |  |

inline static

Definition at line 121 of file _allocator_traits.h.

{
::new (static_cast<void*>(p)) PT(tbb::internal::forward<T1>(t1), tbb::internal::forward<T2>(t2));
}

## construct() [4/4]

template<typename Alloc>
template<typename PT , typename T1 , typename T2 , typename T3 >

static void tbb::internal::allocator_traits< Alloc >::construct | ( | Alloc & | ,
|  | PT * | p,
|  | __TBB_FORWARDING_REF(T1) | t1,
|  | __TBB_FORWARDING_REF(T2) | t2,
|  | __TBB_FORWARDING_REF(T3) | t3
| ) |  |

inline static

Definition at line 126 of file _allocator_traits.h.

{
::new (static_cast<void*>(p)) PT(tbb::internal::forward<T1>(t1), tbb::internal::forward<T2>(t2),
tbb::internal::forward<T3>(t3));
}

## deallocate()

template<typename Alloc>

static void tbb::internal::allocator_traits< Alloc >::deallocate | ( | Alloc & | a,
|  | pointer | p,
|  | size_type | n
| ) |  |

inline static

Definition at line 106 of file _allocator_traits.h.

{
a.deallocate(p, n);
}

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::delete_node(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::~node_scoped_guard().

Here is the caller graph for this function:

## destroy()

template<typename Alloc>
template<typename T >

static void tbb::internal::allocator_traits< Alloc >::destroy | ( | Alloc & | ,
|  | T * | p
| ) |  |

inline static

Definition at line 133 of file _allocator_traits.h.

{
p->~T();
tbb::internal::suppress_unused_warning(p);
}

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::delete_node(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::~node_scoped_guard().

Here is the caller graph for this function:

## select_on_container_copy_construction()

template<typename Alloc>

static Alloc tbb::internal::allocator_traits< Alloc >::select_on_container_copy_construction | ( | const Alloc & | a | ) |

inline static

Definition at line 138 of file _allocator_traits.h.

{ return a; }

The documentation for this struct was generated from the following file:

- _allocator_traits.h

tbb::internal::suppress_unused_warning
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:398
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91

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.