|
deque::get_allocatorpublic member function
allocator_type get_allocator() const; Get allocator Returns the allocator object used to constuct the deque object.ParametersnoneReturn ValueThe allocator.Member type allocator_type is defined to the same as the second template parameter used to instantitate this specific deque class (its Allocator type). Example
The example shows an elaborate way to allocate memory for an array of ints using the same allocator used by the deque object. Output:
ComplexityConstant.
|