From 365e1851ab1b2f2e7eca2fb0697e5b7ff1023b60 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 9 Jan 2026 02:31:16 +0100 Subject: chore: Nectar grunt work on runtime library and test code. Signed-off-by: Amlal El Mahrouss --- include/LibC++/base_alloc.h | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 include/LibC++/base_alloc.h (limited to 'include/LibC++/base_alloc.h') diff --git a/include/LibC++/base_alloc.h b/include/LibC++/base_alloc.h deleted file mode 100644 index 6c7ad06..0000000 --- a/include/LibC++/base_alloc.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (See accompanying -// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) -// Official repository: https://github.com/nekernel-org/nectar - -#ifndef NECTAR_LIBCXX_BASE_ALLOC_H -#define NECTAR_LIBCXX_BASE_ALLOC_H - -#include - -namespace std::base_alloc { -/// @brief allocate a new class. -/// @tparam KindClass the class type to allocate. -template -inline KindClass* allocate(Args&&... args) { - return new KindClass(forward(args)...); -} - -/// @brief allocate a new class. -/// @note aborts on error. -/// @tparam KindClass the class type to allocate. -template -inline KindClass* allocate_nothrow(Args&&... args) noexcept { - return allocate(forward(args)...); -} - -/// @brief free a class. -/// @tparam KindClass the class type to allocate. -template -inline void release(KindClass ptr) { - if (!ptr) return; - - delete ptr; -} - -/// @brief destroy and free a class. -/// @note aborts on error. -/// @tparam KindClass the class type to allocate. -template -inline void release_nothrow(KindClass ptr) noexcept { - release(ptr); -} -} // namespace std::base_alloc - -#endif // NECTAR_LIBCXX_BASE_ALLOC_H -- cgit v1.2.3