std::experimental::bad_array_length
From cppreference.com
After reviewing national body comments to n3690, arrays of runtime bound and the dynarray library component was voted out from C++14 working paper into a separate Technical Specification. This class is not a part of the draft C++14 as of n3797 |
Defined in header <experimental/new>
|
||
class bad_array_length : public std::bad_alloc; |
||
std::bad_array_length
is the type of the object thrown as exceptions by the constructors of arrays of runtime bound and objects of type std::dynarray to report invalid array lengths if
1) array length is negative or equal to zero (for arrays of runtime bound)
2) total size of the new array would exceed implementation-defined maximum value (for both arrays of runtime bound and std::dynarray)
This section is incomplete Reason: inheritance diagram |
Contents |
[edit] Member functions
(constructor) |
constructs the bad_array_length object (public member function) |
std::bad_array_length::bad_array_length
bad_array_length(); |
(since C++14) | |
Constructs new exception object.
Parameters
(none)
Exceptions
noexcept specification:
noexcept
Inherited from std::bad_alloc
Inherited from std::exception
Member functions
[virtual] |
destructs the exception object (virtual public member function of std::exception )
|
[virtual] |
returns an explanatory string (virtual public member function of std::exception )
|
[edit] Notes
The override for the virtual member function what()
may by provided, but is not required.
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
(C++11) |
exception thrown on allocation of array with invalid length (class) |