[NFC][libc++] Use a better type_trait to show the intention.
authorMark de Wever <koraq@xs4all.nl>
Thu, 29 Jun 2023 17:56:28 +0000 (19:56 +0200)
committerMark de Wever <koraq@xs4all.nl>
Thu, 29 Jun 2023 17:56:28 +0000 (19:56 +0200)
libcxx/include/__format/formatter_integer.h

index f7dac28..dca3cb3 100644 (file)
@@ -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 @@ public:
       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);