Allocator Concept
The Allocator Concept for allocators in Intel Threading Building Blocks is similar to the allocator requirements in Table 32 of the ISO C++ standard, but with further guarantees required by the ISO C++ standard (Section 20.1.5, paragraph 4) for use with ISO C++ containers. Table 6-1 summarizes the Allocator Concept. Here, A and B represent instances of the allocator class.
Table 6-1. Allocator Concept
|
Pseudosignature |
Semantics |
|---|---|
|
|
Pointer to |
|
|
Pointer to |
|
|
Reference to |
|
|
Reference to const |
|
|
Type of value to be allocated |
|
|
Type for representing number of values |
|
|
Type for representing pointer difference |
|
template<typename U> struct rebind {
typedef A<U> A::other;
};
|
Rebind to a different type |
|
|
Default constructor |
|
|
Copy constructor |
|
|
Rebinding constructor |
|
|
Destructor |
|
|
Return address |
|
|
Take |
|
|
Allocate space for |
|
|
Deallocate |
|
|
Maximum plausible argument permitted to the method |
|
|