From dd29156c85265678c3120d07c3f24d2bd029cc0f Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 6 Dec 2022 17:36:20 +0100 Subject: [PATCH] Alloc: make() now takes variadic arguments, to forward to the constructor --- luna/include/luna/Alloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luna/include/luna/Alloc.h b/luna/include/luna/Alloc.h index 9985d363..fc89132f 100644 --- a/luna/include/luna/Alloc.h +++ b/luna/include/luna/Alloc.h @@ -3,9 +3,9 @@ #include #include -template Result make() +template Result make(Args... args) { - T* const result = new T; + T* const result = new T(args...); if (!result) return err(ENOMEM); return result; }