[libc-commits] [libc] eb97599 - [libc][NFC] Add missing constexpr (#82007)

via libc-commits libc-commits at lists.llvm.org
Fri Feb 16 08:57:25 PST 2024


Author: Guillaume Chatelet
Date: 2024-02-16T17:57:22+01:00
New Revision: eb97599335be0e65de337681ce558818e57e382f

URL: https://github.com/llvm/llvm-project/commit/eb97599335be0e65de337681ce558818e57e382f
DIFF: https://github.com/llvm/llvm-project/commit/eb97599335be0e65de337681ce558818e57e382f.diff

LOG: [libc][NFC] Add missing constexpr (#82007)

This is a fix forward for the Fuchsia build bot
https://lab.llvm.org/buildbot/#/builders/98/builds/33515

Added: 
    

Modified: 
    libc/src/__support/number_pair.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/number_pair.h b/libc/src/__support/number_pair.h
index 934f41806b5f30..ee6667b1299fe8 100644
--- a/libc/src/__support/number_pair.h
+++ b/libc/src/__support/number_pair.h
@@ -21,8 +21,8 @@ template <typename T> struct NumberPair {
 };
 
 template <typename T>
-cpp::enable_if_t<cpp::is_integral_v<T> && cpp::is_unsigned_v<T>, NumberPair<T>>
-split(T a) {
+cpp::enable_if_t<cpp::is_integral_v<T> && cpp::is_unsigned_v<T>,
+                 NumberPair<T>> constexpr split(T a) {
   constexpr size_t HALF_BIT_WIDTH = sizeof(T) * 4;
   constexpr T LOWER_HALF_MASK = (T(1) << HALF_BIT_WIDTH) - T(1);
   NumberPair<T> result;


        


More information about the libc-commits mailing list