cppreference.com > C++ Double-ended Queues > max_size
max_size
Syntax:
  #include <deque>
  size_type max_size() const;

The max_size() function returns the maximum number of elements that the dequeue can hold. The max_size() function should not be confused with the size() or (C++ Strings) capacity() functions, which return the number of elements currently in the dequeue and the the number of elements that the dequeue will be able to hold before more memory will have to be allocated, respectively.