[libc-commits] [libc] [llvm] [libc] Remove UB specializations of type traits for `BigInt` (PR #84035)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Fri Mar 8 00:21:44 PST 2024


================
@@ -38,7 +38,8 @@ TestLogger &operator<<(TestLogger &logger, Location Loc) {
 // When the value is UInt128, __uint128_t or wider, show its hexadecimal
 // digits.
 template <typename T>
-cpp::enable_if_t<cpp::is_integral_v<T> && (sizeof(T) > sizeof(uint64_t)),
+cpp::enable_if_t<(cpp::is_integral_v<T> && (sizeof(T) > sizeof(uint64_t))) ||
+                     cpp::is_big_int_v<T>,
----------------
gchatelet wrote:

> Ok, now I see how it all fits together. Sorry for being slow on the uptake, but I do appreciate the patient explanations!

No worries! It's important to speak up when something is unclear, and I'm happy to provide explanations or discuss rationale earlier than later.

> should they (and cpp::is_big_int<T>) also be moved out of the cpp:: namespace?

I think so, there is a bit of cleanup left. I'll take care of it. Things have grown organically for a while and we're slowly paying the technical debt.

https://github.com/llvm/llvm-project/pull/84035


More information about the libc-commits mailing list