deque::max_size

Returns the maximum length of the deque.

size_type max_size( ) const;

Return Value

The maximum possible length of the deque.

Example

// deque_max_size.cpp
// compile with: /EHsc
#include <deque>
#include <iostream>

int main( ) 
{
   using namespace std;
   deque <int> c1;
   deque <int>::size_type i;

   i = c1.max_size( );
   cout << "The maximum possible length of the deque is " << i << "." << endl;
}

Sample Output

The maximum possible length of the deque is 1073741823.

Requirements

Header: <deque>

Namespace: std

See Also

Reference

deque Class

Standard Template Library

Other Resources

deque Class Members