From d241eaf1b209dcfb05656842dd6250067b704d99 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Tue, 19 Nov 2024 00:08:33 +0100 Subject: Add allocator, start work on box --- asl/layout.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'asl/layout.hpp') diff --git a/asl/layout.hpp b/asl/layout.hpp index 06fbe10..2295a1c 100644 --- a/asl/layout.hpp +++ b/asl/layout.hpp @@ -24,6 +24,12 @@ struct layout { return layout{ size_of, align_of }; } + + template + static constexpr layout array(isize_t size) + { + return layout{ size_of * size, align_of }; + } }; } // namespace asl -- cgit