From f7930b3a1279922cf9e6e75e651fe9b5df247bc6 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 2 Dec 2025 01:39:42 -0500 Subject: chore: source level tweaks and breaking API changes. Signed-off-by: Amlal El Mahrouss --- src/LibC++/defines.h | 5 +++++ src/LibC++/filesystem.h | 2 -- src/LibC++/new.h | 22 ++++++++++------------ 3 files changed, 15 insertions(+), 14 deletions(-) (limited to 'src/LibC++') diff --git a/src/LibC++/defines.h b/src/LibC++/defines.h index 9293bc2..6aac009 100644 --- a/src/LibC++/defines.h +++ b/src/LibC++/defines.h @@ -73,4 +73,9 @@ typedef union double_cast { double f; } __ATTRIBUTE(packed) double_cast_t; +namespace std { +struct placement_t; +struct nothrow_t; +} // namespace std + #endif /* __NECTI_DEFINES_H__ */ diff --git a/src/LibC++/filesystem.h b/src/LibC++/filesystem.h index 807ab0d..4627c50 100644 --- a/src/LibC++/filesystem.h +++ b/src/LibC++/filesystem.h @@ -9,8 +9,6 @@ #include -/// @brief Filesystem module for LibC++ - namespace std { class path; class filesystem_error; diff --git a/src/LibC++/new.h b/src/LibC++/new.h index 37e2a26..27c8159 100644 --- a/src/LibC++/new.h +++ b/src/LibC++/new.h @@ -9,27 +9,25 @@ #include namespace std { -struct placement_new; - -/// ========================================================= -/// @brief Disambugate non-throwing allocation functions. -/// ========================================================= -struct nothrow_t { +struct nothrow_t final { explicit nothrow_t() = default; + ~nothrow_t() = default; }; -/// ========================================================= -/// @brief Placement new metadata. -/// ========================================================= -struct placement_new final { +struct placement_t final { + explicit placement_t() = default; + ~placement_t() = default; + void* __base{}; int32_t __align{}; size_t __size{}; }; - -using placement_new_t = placement_new; } // namespace std +#ifndef __has_placement +#define placement +#endif + void* operator new(size_t); void* operator new[](size_t); -- cgit v1.2.3