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

This commit is contained in:
Mark de Wever
2023-06-29 19:56:28 +02:00
parent 17bde328d6
commit 9595a18de1

View 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);