37 #pragma GCC system_header
42 #pragma GCC visibility push(default)
59 #if __cplusplus >= 201103L
69 virtual const char*
what()
const throw();
72 #if __cplusplus >= 201103L
73 class bad_array_new_length :
public bad_alloc
76 bad_array_new_length() throw() { }
80 virtual ~bad_array_new_length() throw();
83 virtual const
char* what() const throw();
88 enum class align_val_t: size_t {};
93 #if __cplusplus >= 201103L
94 explicit nothrow_t() =
default;
98 extern const nothrow_t nothrow;
108 #if __cplusplus >= 201103L
125 _GLIBCXX_NODISCARD
void*
operator new(std::size_t) _GLIBCXX_THROW (
std::bad_alloc)
126 __attribute__((__externally_visible__));
127 _GLIBCXX_NODISCARD
void* operator new[](std::
size_t) _GLIBCXX_THROW (std::bad_alloc)
128 __attribute__((__externally_visible__));
129 void operator delete(
void*) _GLIBCXX_USE_NOEXCEPT
130 __attribute__((__externally_visible__));
131 void operator delete[](
void*) _GLIBCXX_USE_NOEXCEPT
132 __attribute__((__externally_visible__));
133 #if __cpp_sized_deallocation
134 void operator delete(
void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
135 __attribute__((__externally_visible__));
136 void operator delete[](
void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
137 __attribute__((__externally_visible__));
139 _GLIBCXX_NODISCARD
void*
operator new(std::size_t,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
141 _GLIBCXX_NODISCARD
void*
operator new[](std::size_t,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
142 __attribute__((__externally_visible__,
__malloc__));
143 void operator delete(
void*,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
144 __attribute__((__externally_visible__));
145 void operator delete[](
void*,
const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
146 __attribute__((__externally_visible__));
147 #if __cpp_aligned_new
148 _GLIBCXX_NODISCARD
void*
operator new(std::size_t, std::align_val_t)
149 __attribute__((__externally_visible__));
150 _GLIBCXX_NODISCARD
void*
operator new(std::size_t, std::align_val_t,
const std::nothrow_t&)
151 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__,
__malloc__));
152 void operator delete(
void*, std::align_val_t)
153 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
154 void operator delete(
void*, std::align_val_t,
const std::nothrow_t&)
155 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
156 _GLIBCXX_NODISCARD
void*
operator new[](std::size_t, std::align_val_t)
157 __attribute__((__externally_visible__));
158 _GLIBCXX_NODISCARD
void*
operator new[](std::size_t, std::align_val_t,
const std::nothrow_t&)
159 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__,
__malloc__));
160 void operator delete[](
void*, std::align_val_t)
161 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
162 void operator delete[](
void*, std::align_val_t,
const std::nothrow_t&)
163 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
164 #if __cpp_sized_deallocation
165 void operator delete(
void*, std::size_t, std::align_val_t)
166 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
167 void operator delete[](
void*, std::size_t, std::align_val_t)
168 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
169 #endif // __cpp_sized_deallocation
170 #endif // __cpp_aligned_new
173 _GLIBCXX_NODISCARD
inline void*
operator new(std::size_t,
void* __p) _GLIBCXX_USE_NOEXCEPT
175 _GLIBCXX_NODISCARD
inline void*
operator new[](std::size_t,
void* __p) _GLIBCXX_USE_NOEXCEPT
179 inline void operator delete (
void*,
void*) _GLIBCXX_USE_NOEXCEPT { }
180 inline void operator delete[](
void*,
void*) _GLIBCXX_USE_NOEXCEPT { }
184 #if __cplusplus >= 201703L
185 #ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER
188 #define __cpp_lib_launder 201606
190 template<
typename _Tp>
191 [[nodiscard]] constexpr _Tp*
193 {
return __builtin_launder(__p); }
198 template<
typename _Ret,
typename... _Args _GLIBCXX_NOEXCEPT_PARM>
199 void launder(_Ret (*)(_Args...) _GLIBCXX_NOEXCEPT_QUAL) =
delete;
200 template<
typename _Ret,
typename... _Args _GLIBCXX_NOEXCEPT_PARM>
201 void launder(_Ret (*)(_Args......) _GLIBCXX_NOEXCEPT_QUAL) =
delete;
203 void launder(
void*) =
delete;
204 void launder(
const void*) =
delete;
205 void launder(
volatile void*) =
delete;
206 void launder(
const volatile void*) =
delete;
208 #endif // _GLIBCXX_HAVE_BUILTIN_LAUNDER
211 #if __cplusplus > 201703L
214 struct destroying_delete_t
216 explicit destroying_delete_t() =
default;
218 inline constexpr destroying_delete_t destroying_delete{};
221 #if __cpp_impl_destroying_delete
222 # define __cpp_lib_destroying_delete 201806L
226 #pragma GCC visibility pop
enable_if< ::__array_traits< _Tp, _Nm >::_Is_swappable::value >::type noexcept(noexcept(__one.swap(__two)))
swap
virtual const char * what() const
Base class for all library exceptions.
Exception possibly thrown by new.bad_alloc (or classes derived from it) is used to report allocation ...
new_handler get_new_handler() noexcept
Return the current new handler.
_GLIBCXX_NODISCARD void __malloc__
new_handler set_new_handler(new_handler)
Takes a replacement handler as the argument, returns the previous handler.