[libc-commits] [libc] [libc][math][c23] adds `nanf128` (PR #85201)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Fri Mar 15 01:26:35 PDT 2024


================
@@ -993,6 +993,15 @@ struct is_big_int<BigInt<Bits, Signed, T>> : cpp::true_type {};
 template <class T>
 LIBC_INLINE_VAR constexpr bool is_big_int_v = is_big_int<T>::value;
 
+// make_unsigned and make_signed type traits
+template <size_t Bits, bool Signed, typename T>
+struct cpp::make_unsigned<BigInt<Bits, Signed, T>>
+    : cpp::type_identity<BigInt<Bits, false, T>> {};
+
+template <size_t Bits, bool Signed, typename T>
+struct cpp::make_signed<BigInt<Bits, Signed, T>>
+    : cpp::type_identity<BigInt<Bits, true, T>> {};
+
----------------
gchatelet wrote:

It's a bit verbose but at least it's pretty clear what it does. LGTM.

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


More information about the libc-commits mailing list