mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 07:58:23 +08:00
[NFC][libc++] Use a better type_trait to show the intention.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user