BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslma::TestAllocatorException Class Reference

#include <bslma_testallocatorexception.h>

Inheritance diagram for bslma::TestAllocatorException:

Detailed Description

This class defines an exception object for memory allocation operations. Objects of this class contain information about an allocation request.

See bslma_testallocatorexception

Public Types

typedef Allocator::size_type size_type
 

Public Member Functions

 TestAllocatorException (size_type numBytes)
 
 ~TestAllocatorException ()
 
size_type numBytes () const
 
const char * what () const BSLS_EXCEPTION_VIRTUAL_NOTHROW BSLS_KEYWORD_OVERRIDE
 

Member Typedef Documentation

◆ size_type

Alias for the type used by the Allocator protocol to request a memory allocation of a given size.

Constructor & Destructor Documentation

◆ TestAllocatorException()

bslma::TestAllocatorException::TestAllocatorException ( size_type  numBytes)
inlineexplicit

Create an exception object initialized with the specified numBytes that indicates an allocation request size.

◆ ~TestAllocatorException()

bslma::TestAllocatorException::~TestAllocatorException ( )

Destroy this object.

Member Function Documentation

◆ numBytes()

TestAllocatorException::size_type bslma::TestAllocatorException::numBytes ( ) const
inline

Return the number of bytes (supplied at construction) that indicates an allocation request size.

◆ what()

const char * bslma::TestAllocatorException::what ( ) const
inline

Return a pointer to the string literal "bslma::TestAllocatorException" having a storage duration of the lifetime of the program.

Note
Note that the caller should not attempt to free this memory.

The documentation for this class was generated from the following file: