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/utility.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'asl/utility.hpp') diff --git a/asl/utility.hpp b/asl/utility.hpp index d54d965..7740eff 100644 --- a/asl/utility.hpp +++ b/asl/utility.hpp @@ -24,6 +24,12 @@ constexpr U bit_cast(T value) requires (size_of == size_of) return __builtin_bit_cast(U, value); } +template +T min(T a, T b) +{ + return (a <= b) ? a : b; +} + #define ASL_DELETE_COPY(T) \ T(const T&) = delete; \ T& operator=(const T&) = delete; -- cgit