[libcxx-commits] [libcxx] 9595a18 - [NFC][libc++] Use a better type_trait to show the intention.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 29 10:56:53 PDT 2023


Author: Mark de Wever
Date: 2023-06-29T19:56:28+02:00
New Revision: 9595a18de12685fdadda6fb432f6b464e046275f

URL: https://github.com/llvm/llvm-project/commit/9595a18de12685fdadda6fb432f6b464e046275f
DIFF: https://github.com/llvm/llvm-project/commit/9595a18de12685fdadda6fb432f6b464e046275f.diff

LOG: [NFC][libc++] Use a better type_trait to show the intention.

Added: 
    

Modified: 
    libcxx/include/__format/formatter_integer.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__format/formatter_integer.h b/libcxx/include/__format/formatter_integer.h
index f7dac28850b4e..dca3cb367e74e 100644
--- a/libcxx/include/__format/formatter_integer.h
+++ b/libcxx/include/__format/formatter_integer.h
@@ -19,7 +19,7 @@
 #include <__format/formatter_integral.h>
 #include <__format/formatter_output.h>
 #include <__format/parser_std_format_spec.h>
-#include <__type_traits/is_same.h>
+#include <__type_traits/is_void.h>
 #include <__type_traits/make_32_64_or_128_bit.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -49,7 +49,7 @@
       return __formatter::__format_char(__value, __ctx.out(), __specs);
 
     using _Type = __make_32_64_or_128_bit_t<_Tp>;
-    static_assert(!is_same<_Type, void>::value, "unsupported integral type used in __formatter_integer::__format");
+    static_assert(!is_void<_Type>::value, "unsupported integral type used in __formatter_integer::__format");
 
     // Reduce the number of instantiation of the integer formatter
     return __formatter::__format_integer(static_cast<_Type>(__value), __ctx, __specs);


        


More information about the libcxx-commits mailing list