Name

length_error class — Exceed maximum size

Synopsis

class length_error : public logic_error {
public:
  explicit length_error(const string& what_arg);
};

The length_error class is used to attempt to set or change the size of an object that exceeds the maximum size. For example, the string class throws length_error if you attempt to create a string longer than max_size( ) characters.

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.