35#define _NEW_EXCEPT_H 1
44namespace std _GLIBCXX_VISIBILITY(default)
46_GLIBCXX_BEGIN_NAMESPACE_VERSION
54 class bad_alloc :
public exception
57 _GLIBCXX26_CONSTEXPR bad_alloc()
throw() { }
59#if __cplusplus >= 201103L
60 _GLIBCXX26_CONSTEXPR bad_alloc(
const bad_alloc&) =
default;
61 _GLIBCXX26_CONSTEXPR bad_alloc& operator=(
const bad_alloc&) =
default;
64#if __cplusplus >= 202400L
65 constexpr virtual ~bad_alloc()
noexcept {}
67 constexpr virtual const char*
what()
const noexcept
69 return "std::bad_alloc";
74 virtual ~bad_alloc()
throw();
77 virtual const char*
what()
const throw();
81#if __cplusplus >= 201103L
82 class bad_array_new_length :
public bad_alloc
85 _GLIBCXX26_CONSTEXPR bad_array_new_length()
throw() { }
87#if __cplusplus >= 202400L
88 constexpr virtual ~bad_array_new_length() noexcept {}
90 constexpr virtual const char*
what() const noexcept
92 return "std::bad_array_new_length";
97 virtual ~bad_array_new_length() throw();
100 virtual const
char* what() const throw();
105_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
Exception possibly thrown by new.
virtual const char * what() const