38#pragma GCC system_header
43#pragma GCC visibility push(default)
60#if __cplusplus >= 201103L
70 virtual const char*
what()
const throw();
73#if __cplusplus >= 201103L
74 class bad_array_new_length :
public bad_alloc
77 bad_array_new_length()
throw() { }
81 virtual ~bad_array_new_length()
throw();
84 virtual const char* what()
const throw();
89 enum class align_val_t:
size_t {};
94#if __cplusplus >= 201103L
95 explicit nothrow_t() =
default;
99 extern const nothrow_t nothrow;
109#if __cplusplus >= 201103L
126_GLIBCXX_NODISCARD
void*
operator new(std::size_t) _GLIBCXX_THROW (
std::bad_alloc)
127 __attribute__((__externally_visible__));
128_GLIBCXX_NODISCARD
void*
operator new[](std::size_t) _GLIBCXX_THROW (
std::bad_alloc)
129 __attribute__((__externally_visible__));
130void operator delete(
void*) _GLIBCXX_USE_NOEXCEPT
131 __attribute__((__externally_visible__));
132void operator delete[](
void*) _GLIBCXX_USE_NOEXCEPT
133 __attribute__((__externally_visible__));
134#if __cpp_sized_deallocation
135void operator delete(
void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
136 __attribute__((__externally_visible__));
137void operator delete[](
void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
138 __attribute__((__externally_visible__));
140_GLIBCXX_NODISCARD
void*
operator new(std::size_t,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
141 __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
142_GLIBCXX_NODISCARD
void*
operator new[](std::size_t,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
143 __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
144void operator delete(
void*,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
145 __attribute__((__externally_visible__));
146void operator delete[](
void*,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
147 __attribute__((__externally_visible__));
149_GLIBCXX_NODISCARD
void*
operator new(std::size_t, std::align_val_t)
150 __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
151_GLIBCXX_NODISCARD
void*
operator new(std::size_t, std::align_val_t,
const std::nothrow_t&)
152 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
153void operator delete(
void*, std::align_val_t)
154 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
155void operator delete(
void*, std::align_val_t,
const std::nothrow_t&)
156 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
157_GLIBCXX_NODISCARD
void*
operator new[](std::size_t, std::align_val_t)
158 __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
159_GLIBCXX_NODISCARD
void*
operator new[](std::size_t, std::align_val_t,
const std::nothrow_t&)
160 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
161void operator delete[](
void*, std::align_val_t)
162 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
163void operator delete[](
void*, std::align_val_t,
const std::nothrow_t&)
164 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
165#if __cpp_sized_deallocation
166void operator delete(
void*, std::size_t, std::align_val_t)
167 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
168void operator delete[](
void*, std::size_t, std::align_val_t)
169 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
174_GLIBCXX_NODISCARD
inline void*
operator new(std::size_t,
void* __p) _GLIBCXX_USE_NOEXCEPT
176_GLIBCXX_NODISCARD
inline void*
operator new[](std::size_t,
void* __p) _GLIBCXX_USE_NOEXCEPT
180inline void operator delete (
void*,
void*) _GLIBCXX_USE_NOEXCEPT { }
181inline void operator delete[](
void*,
void*) _GLIBCXX_USE_NOEXCEPT { }
185#if __cplusplus >= 201703L
186#ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER
189#define __cpp_lib_launder 201606
191 template<
typename _Tp>
192 [[nodiscard]]
constexpr _Tp*
193 launder(_Tp* __p)
noexcept
194 {
return __builtin_launder(__p); }
199 template<
typename _Ret,
typename... _Args _GLIBCXX_NOEXCEPT_PARM>
200 void launder(_Ret (*)(_Args...) _GLIBCXX_NOEXCEPT_QUAL) =
delete;
201 template<
typename _Ret,
typename... _Args _GLIBCXX_NOEXCEPT_PARM>
202 void launder(_Ret (*)(_Args......) _GLIBCXX_NOEXCEPT_QUAL) =
delete;
204 void launder(
void*) =
delete;
205 void launder(
const void*) =
delete;
206 void launder(
volatile void*) =
delete;
207 void launder(
const volatile void*) =
delete;
212#if __cplusplus > 201703L
217 struct destroying_delete_t
219 explicit destroying_delete_t() =
default;
222 inline constexpr destroying_delete_t destroying_delete{};
225#if __cpp_impl_destroying_delete
226# define __cpp_lib_destroying_delete 201806L
230#pragma GCC visibility pop
ISO C++ entities toplevel namespace is std.
new_handler set_new_handler(new_handler)
Takes a replacement handler as the argument, returns the previous handler.
new_handler get_new_handler() noexcept
Return the current new handler.
Exception possibly thrown by new.
virtual const char * what() const
Base class for all library exceptions.