summaryrefslogtreecommitdiffhomepage
path: root/include/LibC++/base_alloc.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-19 10:09:39 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-19 10:09:39 +0100
commit87a30d95dddc0cfcdf77e9d7406c1eea717865ff (patch)
treeca52b9e425046e137aea267515b32149d22c4545 /include/LibC++/base_alloc.h
parent228479a454d325340326f4fd23e13d780884fd2a (diff)
chore: new LibC++ version, updated file structure.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/LibC++/base_alloc.h')
-rw-r--r--include/LibC++/base_alloc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/LibC++/base_alloc.h b/include/LibC++/base_alloc.h
index 7ae03df..cd95806 100644
--- a/include/LibC++/base_alloc.h
+++ b/include/LibC++/base_alloc.h
@@ -11,7 +11,7 @@
namespace std::base_alloc {
/// @brief allocate a new class.
/// @tparam KindClass the class type to allocate.
-template <typename KindClass, typename... Args>
+template <class KindClass, typename... Args>
inline KindClass* allocate(Args&&... args) {
return new KindClass(forward(args)...);
}
@@ -19,14 +19,14 @@ inline KindClass* allocate(Args&&... args) {
/// @brief allocate a new class.
/// @note aborts on error.
/// @tparam KindClass the class type to allocate.
-template <typename KindClass, typename... Args>
+template <class KindClass, typename... Args>
inline KindClass* allocate_nothrow(Args&&... args) noexcept {
return allocate(forward(args)...);
}
/// @brief free a class.
/// @tparam KindClass the class type to allocate.
-template <typename KindClass>
+template <class KindClass>
inline void release(KindClass ptr) {
if (!ptr) return;
@@ -36,7 +36,7 @@ inline void release(KindClass ptr) {
/// @brief destroy and free a class.
/// @note aborts on error.
/// @tparam KindClass the class type to allocate.
-template <typename KindClass>
+template <class KindClass>
inline void release_nothrow(KindClass ptr) noexcept {
release(ptr);
}