39#pragma GCC system_header
45#define __glibcxx_want_launder
46#define __glibcxx_want_hardware_interference_size
47#define __glibcxx_want_destroying_delete
48#define __glibcxx_want_constexpr_new
52#pragma GCC diagnostic push
53#pragma GCC diagnostic ignored "-Wc++11-extensions"
55#pragma GCC visibility push(default)
62 enum class align_val_t:
size_t {};
67#if __cplusplus >= 201103L
68 explicit nothrow_t() =
default;
72 extern const nothrow_t nothrow;
82#if __cplusplus >= 201103L
99_GLIBCXX_NODISCARD
void*
operator new(std::size_t)
101 __attribute__((__externally_visible__, __malloc__));
102_GLIBCXX_NODISCARD
void*
operator new[](std::size_t)
104 __attribute__((__externally_visible__, __malloc__));
105void operator delete(
void*) _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
106 __attribute__((__externally_visible__));
107void operator delete[](
void*) _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
108 __attribute__((__externally_visible__));
109#if __cpp_sized_deallocation
110void operator delete(
void*, std::size_t)
111 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
112 __attribute__((__externally_visible__));
113void operator delete[](
void*, std::size_t)
114 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
115 __attribute__((__externally_visible__));
117_GLIBCXX_NODISCARD
void*
operator new(std::size_t,
const std::nothrow_t&)
118 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
119 __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
120_GLIBCXX_NODISCARD
void*
operator new[](std::size_t,
const std::nothrow_t&)
121 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
122 __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
123void operator delete(
void*,
const std::nothrow_t&)
124 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
125 __attribute__((__externally_visible__));
126void operator delete[](
void*,
const std::nothrow_t&)
127 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
128 __attribute__((__externally_visible__));
130_GLIBCXX_NODISCARD
void*
operator new(std::size_t, std::align_val_t)
132 __attribute__((__externally_visible__, __alloc_size__ (1), __alloc_align__ (2), __malloc__));
133_GLIBCXX_NODISCARD
void*
operator new(std::size_t, std::align_val_t,
const std::nothrow_t&)
134 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
135 __attribute__((__externally_visible__, __alloc_size__ (1), __alloc_align__ (2), __malloc__));
136void operator delete(
void*, std::align_val_t) _GLIBCXX_TXN_SAFE
137 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
138void operator delete(
void*, std::align_val_t,
const std::nothrow_t&)
140 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
141_GLIBCXX_NODISCARD
void*
operator new[](std::size_t, std::align_val_t)
143 __attribute__((__externally_visible__, __alloc_size__ (1), __alloc_align__ (2), __malloc__));
144_GLIBCXX_NODISCARD
void*
operator new[](std::size_t, std::align_val_t,
const std::nothrow_t&)
145 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
146 __attribute__((__externally_visible__, __alloc_size__ (1), __alloc_align__ (2), __malloc__));
147void operator delete[](
void*, std::align_val_t) _GLIBCXX_TXN_SAFE
148 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
149void operator delete[](
void*, std::align_val_t,
const std::nothrow_t&)
151 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
152#if __cpp_sized_deallocation
153void operator delete(
void*, std::size_t, std::align_val_t) _GLIBCXX_TXN_SAFE
154 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
155void operator delete[](
void*, std::size_t, std::align_val_t) _GLIBCXX_TXN_SAFE
156 _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
160#if __cpp_lib_constexpr_new >= 202406L
161# define _GLIBCXX_PLACEMENT_CONSTEXPR constexpr
163# define _GLIBCXX_PLACEMENT_CONSTEXPR inline
167_GLIBCXX_NODISCARD _GLIBCXX_PLACEMENT_CONSTEXPR
168void*
operator new(std::size_t,
void* __p)
169 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
171_GLIBCXX_NODISCARD _GLIBCXX_PLACEMENT_CONSTEXPR
172void*
operator new[](std::size_t,
void* __p)
173 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
177_GLIBCXX_PLACEMENT_CONSTEXPR
void operator delete (
void*,
void*)
178 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
180_GLIBCXX_PLACEMENT_CONSTEXPR
void operator delete[](
void*,
void*)
181 _GLIBCXX_TXN_SAFE _GLIBCXX_USE_NOEXCEPT
184#undef _GLIBCXX_PLACEMENT_CONSTEXPR
191#ifdef __cpp_lib_launder
193 template<typename _Tp>
194 [[nodiscard]]
constexpr _Tp*
195 launder(_Tp* __p)
noexcept
197 if constexpr (__is_same(
const volatile _Tp,
const volatile void))
198 static_assert(!__is_same(
const volatile _Tp,
const volatile void),
199 "std::launder argument must not be a void pointer");
200#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_function)
201 else if constexpr (__is_function(_Tp))
202 static_assert(!__is_function(_Tp),
203 "std::launder argument must not be a function pointer");
206 return __builtin_launder(__p);
211#ifdef __cpp_lib_hardware_interference_size
212 inline constexpr size_t hardware_destructive_interference_size = __GCC_DESTRUCTIVE_SIZE;
213 inline constexpr size_t hardware_constructive_interference_size = __GCC_CONSTRUCTIVE_SIZE;
217#if __cplusplus >= 202002L
220 struct destroying_delete_t
222 explicit destroying_delete_t() =
default;
229#pragma GCC visibility pop
230#pragma GCC diagnostic 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 destroying_delete_t destroying_delete
Tag variable of type destroying_delete_t.
Tag type used to declare a class-specific operator delete that can invoke the destructor before deall...
Exception possibly thrown by new.