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

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Mar 5 08:49:19 PST 2024


================
@@ -208,8 +221,8 @@ template <typename T, typename Fmt = radix::Dec> class IntegerToString {
 
   // An internal stateless structure that handles the number formatting logic.
   struct IntegerWriter {
-    static_assert(cpp::is_integral_v<T>);
-    using UNSIGNED_T = cpp::make_unsigned_t<T>;
+    static_assert(cpp::is_integral_v<T> || cpp::is_big_int_v<T>);
+    using UNSIGNED_T = typename details::IntegerWriterUnsigned<T>::type;
----------------
nickdesaulniers wrote:

interesting, I've not seen `typename` outside of a `template <typename T>`.  What are the language rules for when this is necessary?

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


More information about the libc-commits mailing list