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__));
130 void operator delete(
void*) _GLIBCXX_USE_NOEXCEPT
131 __attribute__((__externally_visible__));
132 void operator delete[](
void*) _GLIBCXX_USE_NOEXCEPT
133 __attribute__((__externally_visible__));
134 #if __cpp_sized_deallocation
135 void operator delete(
void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
136 __attribute__((__externally_visible__));
137 void 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__));
144 void operator delete(
void*,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
145 __attribute__((__externally_visible__));
146 void operator delete[](
void*,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
147 __attribute__((__externally_visible__));
148 #if __cpp_aligned_new
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__));
153 void operator delete(
void*, std::align_val_t)
154 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
155 void 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__));
161 void operator delete[](
void*, std::align_val_t)
162 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
163 void operator delete[](
void*, std::align_val_t,
const std::nothrow_t&)
164 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
165 #if __cpp_sized_deallocation
166 void operator delete(
void*, std::size_t, std::align_val_t)
167 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
168 void 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
180 inline void operator delete (
void*,
void*) _GLIBCXX_USE_NOEXCEPT { }
181 inline void operator delete[](
void*,
void*) _GLIBCXX_USE_NOEXCEPT { }
185 #if __cplusplus >= 201703L
188 #ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER
189 #define __cpp_lib_launder 201606L
191 template<
typename _Tp>
192 [[nodiscard]] constexpr _Tp*
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;
205 void launder(
const void*) =
delete;
206 void launder(
volatile void*) =
delete;
207 void launder(
const volatile void*) =
delete;
210 #ifdef __GCC_DESTRUCTIVE_SIZE
211 # define __cpp_lib_hardware_interference_size 201703L
212 inline constexpr
size_t hardware_destructive_interference_size = __GCC_DESTRUCTIVE_SIZE;
213 inline constexpr
size_t hardware_constructive_interference_size = __GCC_CONSTRUCTIVE_SIZE;
218 #if __cplusplus > 201703L
231 #if __cpp_impl_destroying_delete
232 # define __cpp_lib_destroying_delete 201806L
236 #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.
constexpr _Tp * launder(_Tp *__p) noexcept
Pointer optimization barrier [ptr.launder].
constexpr destroying_delete_t destroying_delete
Tag variable of type destroying_delete_t.
Exception possibly thrown by new.
virtual const char * what() const
Tag type used to declare a class-specific operator delete that can invoke the destructor before deall...
Base class for all library exceptions.