[libc-commits] [libc] [libc][NFC] Add missing constexpr (PR #82007)
via libc-commits
libc-commits at lists.llvm.org
Fri Feb 16 08:24:32 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Guillaume Chatelet (gchatelet)
<details>
<summary>Changes</summary>
This is a fix forward for the Fuchsia build bot
https://lab.llvm.org/buildbot/#/builders/98/builds/33515
---
Full diff: https://github.com/llvm/llvm-project/pull/82007.diff
1 Files Affected:
- (modified) libc/src/__support/number_pair.h (+2-2)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/82007
More information about the libc-commits
mailing list