diff --git a/luna/include/luna/Alloc.h b/luna/include/luna/Alloc.h index fc89132f..ba8a0151 100644 --- a/luna/include/luna/Alloc.h +++ b/luna/include/luna/Alloc.h @@ -1,16 +1,14 @@ #pragma once -#include #include -#include -template Result make(Args... args) +template [[nodiscard]] Result make(Args... args) { T* const result = new T(args...); if (!result) return err(ENOMEM); return result; } -template Result make_array(usize count) +template [[nodiscard]] Result make_array(usize count) { T* const result = new T[count]; if (!result) return err(ENOMEM);