std::bad_alloc Class Reference
Diagnostics » Exceptions

`#include <new_except.h>`

Inheritance diagram for std::bad_alloc:
[legend]

## Public Member Functions

_GLIBCXX26_CONSTEXPR | bad_alloc (const bad_alloc &)=default
_GLIBCXX26_CONSTEXPR bad_alloc & | operator= (const bad_alloc &)=default
virtual constexpr 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.

## Constructor & Destructor Documentation

## bad_alloc()

_GLIBCXX26_CONSTEXPR std::bad_alloc::bad_alloc | ( |  | ) |
throw | ( | ) |  |  |

inline

Definition at line 57 of file new_except.h.

## ~bad_alloc()

virtual constexpr std::bad_alloc::~bad_alloc | ( |  | ) |

inline constexpr virtual noexcept

Definition at line 66 of file new_except.h.

## Member Function Documentation

## what()

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

inline constexpr virtual noexcept

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:

- new_except.h