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

Michael Flanders via libc-commits libc-commits at lists.llvm.org
Thu Mar 14 18:35:55 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>> {};
+
----------------
Flandini wrote:

I pulled the related code out of `integer_to_string.h` and into `UInt.h`. I went with `make_integer_or_big_int_signed` styling on the name to match the other trait in `UInt.h`. 

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


More information about the libc-commits mailing list