From 0776012d0942537b1ddfef13cd37f8bfb125f501 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Tue, 1 Apr 2025 00:39:24 +0200 Subject: Add bit library --- asl/base/utility.hpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'asl/base/utility.hpp') diff --git a/asl/base/utility.hpp b/asl/base/utility.hpp index 85c873d..77ccc6b 100644 --- a/asl/base/utility.hpp +++ b/asl/base/utility.hpp @@ -47,9 +47,6 @@ template namespace asl { -struct in_place_t {}; -static constexpr in_place_t in_place{}; - template constexpr void swap(T& a, T& b) { @@ -84,27 +81,6 @@ constexpr T max(T a, T b) return (a >= b) ? a : b; } -constexpr uint64_t round_up_pow2(uint64_t v) -{ - ASL_ASSERT(v <= 0x8000'0000'0000'0000); - - v -= 1; - - v |= v >> 1U; - v |= v >> 2U; - v |= v >> 4U; - v |= v >> 8U; - v |= v >> 16U; - v |= v >> 32U; - - return v + 1; -} - -constexpr bool is_pow2(isize_t v) -{ - return v > 0 && ((v - 1) & v) == 0; // NOLINT -} - // NOLINTBEGIN(*-macro-parentheses) #define ASL_DELETE_COPY(T) \ T(const T&) = delete; \ -- cgit