cppreference.com > C++ Lists > max_size
max_size
Syntax:
  size_type max_size() const;

The max_size() function returns the maximum number of elements that the list can hold.