memory
|
The exception class thrown when the alignment exceeds the supported maximum, i.e.
it is bigger than max_alignment()
. It is derived from bad_allocation_size but does not override the handler.
Typedefs | |
using | handler = void(*)(const allocator_info &info, std::size_t passed, std::size_t supported) |
The type of the handler called in the constructor of bad_allocation_size. | |
Static Functions | |
static handler | set_handler (handler h) |
static handler | get_handler () |
Member Functions | |
bad_alignment (const allocator_info &info, std::size_t passed, std::size_t supported) | |
const char * | what () const noexcept override |
const allocator_info & | allocator () const noexcept |
std::size_t | passed_value () const noexcept |
std::size_t | supported_value () const noexcept |
|
inherited |
The type of the handler called in the constructor of bad_allocation_size.
When a bad allocation size is detected and the exception object created, this handler gets called. It is especially useful if exception support is disabled. It gets the allocator_info, the size passed to the function and the supported size (the latter is still an upper bound).
std::bad_alloc
or abort the program. If it returns, this exception object will be created and thrown. stderr
and continues execution, leading to this exception being thrown. On a freestanding implementation it does nothing. bad_alignment | ( | const allocator_info & | info, |
std::size_t | passed, | ||
std::size_t | supported | ||
) |
passed
is count * size
, supported
the size in bytes.
|
overridenoexcept |
|
noexceptinherited |
|
noexceptinherited |
|
noexceptinherited |