deque - STL C++

deque<X, A>::allocator_type

Declaration

typedef A deque<X, A>::allocator_type;

Description

This is a type definition of the data type allocator_type for the deque class template. This is used to define the type that allocates storage for elements of the deque container.

Header Include

#include <deque>

Example

#include <iostream>
#include <deque>

int main()
{
	using namespace std;

	// Create a deque and output its max allocation size
	deque<int> qDeque;
	deque<int>::allocator_type qAllocator = qDeque.get_allocator();
	cout << "The max allocation size = " << qAllocator.max_size() << endl;

	// Keep the window open
	cin.get();
	return 0;
}

Output

deque<X, A>::allocator_type Output
 

© 2007–2024 XoaX.net LLC. All rights reserved.