summaryrefslogtreecommitdiffstats
path: root/libcxx/include/new
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/new')
-rw-r--r--libcxx/include/new15
1 files changed, 15 insertions, 0 deletions
diff --git a/libcxx/include/new b/libcxx/include/new
index 4cf4c4c1e7b..85e4c4b3fcf 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -33,6 +33,12 @@ public:
};
enum class align_val_t : size_t {}; // C++17
+
+struct destroying_delete_t { // C++20
+ explicit destroying_delete_t() = default;
+};
+inline constexpr destroying_delete_t destroying_delete{}; // C++20
+
struct nothrow_t {};
extern const nothrow_t nothrow;
typedef void (*new_handler)();
@@ -158,6 +164,15 @@ enum align_val_t { __zero = 0, __max = (size_t)-1 };
#endif
#endif
+#if _LIBCPP_STD_VER > 17
+// Enable the declaration even if the compiler doesn't support the language
+// feature.
+struct destroying_delete_t {
+ explicit destroying_delete_t() = default;
+};
+_LIBCPP_INLINE_VAR constexpr destroying_delete_t destroying_delete{};
+#endif // _LIBCPP_STD_VER > 17
+
} // std
#if defined(_LIBCPP_CXX03_LANG)
OpenPOWER on IntegriCloud