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 |
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access