summaryrefslogtreecommitdiffhomepage
path: root/src/LibC++
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-02 01:39:42 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-02 01:40:12 -0500
commitf7930b3a1279922cf9e6e75e651fe9b5df247bc6 (patch)
tree984d92f85d89aaf355a51af13d45a358da6473b7 /src/LibC++
parentc895f469119903b3874d74604e582aed0da989ae (diff)
chore: source level tweaks and breaking API changes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/LibC++')
-rw-r--r--src/LibC++/defines.h5
-rw-r--r--src/LibC++/filesystem.h2
-rw-r--r--src/LibC++/new.h22
3 files changed, 15 insertions, 14 deletions
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 <LibC++/defines.h>
-/// @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 <LibC++/defines.h>
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);