diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-20 13:01:24 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-20 13:01:57 +0100 |
| commit | 34fc5336b50c6ae490546ee8f5c95eedb80b49e8 (patch) | |
| tree | 2a3004c5c54899747a43a336774bf78e89d8126a /include/LibC++/new.h | |
| parent | 2a40debc078efdcacb23762aae89ae307e8b81e9 (diff) | |
feat: new types `callable_type`, `complex_domain`, and `real_domain` for LibC++/Nectar.v0.1.0
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/LibC++/new.h')
| -rw-r--r-- | include/LibC++/new.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/LibC++/new.h b/include/LibC++/new.h index 2c5715f..db25b82 100644 --- a/include/LibC++/new.h +++ b/include/LibC++/new.h @@ -6,7 +6,7 @@ #pragma once -#include <LibC++/defines.h> +#include <defines> namespace std { struct nothrow_t final { @@ -38,15 +38,18 @@ void* operator new(size_t); void* operator new[](size_t); /// \brief placement_t new and delete operators. Governs how the memory shall be placed. -/// \note This is a feature that shall be used wisely, failure to do so will produce Undefined Behaviors at runtime. +/// \note This is a feature that shall be used wisely, failure to do so will produce Undefined +/// Behaviors at runtime. void* operator _placement_new(struct placement_t*); void operator _placement_delete(struct placement_t*, void*); /// \brief For all offsets within the base range and alignement 'align' -/// \brief Allocate offsets with respect to the `base` interval, apply alignement of `align` value. Return `offsets` of length n as an aligned value within the domain of `base`. -using placeable_callable_type = void*/*offsets*/(*)(void* base, size_t n, const int& align); +/// \brief Allocate offsets with respect to the `base` interval, apply alignement of `align` value. +/// Return `offsets` of length n as an aligned value within the domain of `base`. +using placeable_callable_type = void* /*offsets*/ (*) (void* base, size_t n, const int& align); -/// \note This should NOT fail, failure to meet the conditions will cause the program's state to be aborted. +/// \note This should NOT fail, failure to meet the conditions will cause the program's state to be +/// aborted. /// \brief Set the placement policy of future memory allocations. template <class PlaceableCallable> void set_placement_policy(const PlaceableCallable&) noexcept; |
