From 3adfe00f51cddbeb330a2bdbee74b2d47d42fdf9 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Wed, 26 Aug 2020 17:18:03 +0100 Subject: [PATCH] Missing 32bit case. --- src/ds/bits.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ds/bits.h b/src/ds/bits.h index 08eccaa..1680460 100644 --- a/src/ds/bits.h +++ b/src/ds/bits.h @@ -82,6 +82,10 @@ namespace snmalloc { return static_cast(__builtin_clzll(x)); } + else if constexpr (std::is_same_v) + { + return static_cast(__builtin_clz(x)); + } #endif } @@ -159,6 +163,10 @@ namespace snmalloc { return static_cast(__builtin_ctzll(x)); } + else if constexpr (std::is_same_v) + { + return static_cast(__builtin_ctz(x)); + } #endif }