libstdc++
Public Member Functions | List of all members
std::bad_alloc Class Reference
Inheritance diagram for std::bad_alloc:
[legend]

Public Member Functions

_GLIBCXX26_CONSTEXPR bad_alloc (const bad_alloc &)=default
 
_GLIBCXX26_CONSTEXPR bad_allocoperator= (const bad_alloc &)=default
 
constexpr virtual const char * what () const noexcept
 

Detailed Description

Exception possibly thrown by new.

bad_alloc (or classes derived from it) is used to report allocation errors from the throwing forms of new.

Definition at line 54 of file new_except.h.

Member Function Documentation

◆ what()

constexpr virtual const char* std::bad_alloc::what ( ) const
inlineconstexprvirtualnoexcept

Returns a C-style character string describing the general cause of the current error.

Reimplemented from std::exception.

Definition at line 69 of file new_except.h.


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