This class defines an exception object for memory allocation operations. Objects of this class contain information about an allocation request.
Declared in <bslma_testallocatorexception.h>
class TestAllocatorException
: public std::bad_alloc
| Name | Description |
|---|---|
std::bad_alloc | Exception possibly thrown by new. |
| Name | Description |
|---|---|
size_type | Alias for the type used by the Allocator protocol to request a memory allocation of a given size. |
| Name | Description |
|---|---|
TestAllocatorException [constructor] | Create an exception object initialized with the specified numBytes that indicates an allocation request size. |
operator= | |
numBytes | Return the number of bytes (supplied at construction) that indicates an allocation request size. |
what [virtual] | Return a pointer to the string literal "bslma::TestAllocatorException" having a storage duration of the lifetime of the program. Note that the caller should not attempt to free this memory. |