diff options
Diffstat (limited to 'dev/LibC++')
| -rw-r--r-- | dev/LibC++/filesystem.h | 2 | ||||
| -rw-r--r-- | dev/LibC++/new.cc | 8 | ||||
| -rw-r--r-- | dev/LibC++/new.h | 39 |
3 files changed, 37 insertions, 12 deletions
diff --git a/dev/LibC++/filesystem.h b/dev/LibC++/filesystem.h index 59e73a0..0a1a39a 100644 --- a/dev/LibC++/filesystem.h +++ b/dev/LibC++/filesystem.h @@ -9,6 +9,8 @@ #include <LibC++/defines.h> +/// @brief Filesystem module for LibC++ + namespace std { class path; class filesystem_error; diff --git a/dev/LibC++/new.cc b/dev/LibC++/new.cc new file mode 100644 index 0000000..4882652 --- /dev/null +++ b/dev/LibC++/new.cc @@ -0,0 +1,8 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. + +------------------------------------------- */ + +#include <LibC++/new.h> + diff --git a/dev/LibC++/new.h b/dev/LibC++/new.h index 8b09328..3ac60d7 100644 --- a/dev/LibC++/new.h +++ b/dev/LibC++/new.h @@ -1,4 +1,3 @@ - /* ------------------------------------------- Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. @@ -9,21 +8,37 @@ #include <LibC++/defines.h> -struct __placement_new_info; +namespace std { +struct placement_new; + +/// ========================================================= +/// @brief Disambugate non-throwing allocation functions. +/// ========================================================= +struct nothrow_t { + explicit nothrow_t() = default; +}; + +/// ========================================================= +/// @brief Placement new metadata. +/// ========================================================= +struct placement_new { + void* __base; + int __align; + long long __size; +}; + +using placement_new_t = placement_new; +} // namespace std void* operator new(size_t); void* operator new[](size_t); +void* operator new(size_t, const std::nothrow_t&) noexcept; +void* operator new(size_t, void*) noexcept; +void* operator new[](size_t, const std::nothrow_t&) noexcept; +void* operator new[](size_t, void*) noexcept; + void operator delete(void*) noexcept; -void operator delete(void*, unsigned long) noexcept; +void operator delete(void*, size_t) noexcept; void operator delete[](void*) noexcept; - -/// ========================================================= -/// @brief Placement new information structure -/// ========================================================= -struct __placement_new_info { - void* __base; - int __align; - long long __size; -};
\ No newline at end of file |
