mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-23 17:59:52 +00:00
Use FMT_HAS_INCLUDE and apply clang-format
This commit is contained in:
parent
99070899b7
commit
44e0eea94e
@ -799,11 +799,9 @@ using is_integer =
|
||||
|
||||
#ifndef FMT_USE_FLOAT128
|
||||
# ifdef __clang__
|
||||
// Clang C++ emulates GCC, so it has to appear early.
|
||||
# if defined(__has_include)
|
||||
# if __has_include(<quadmath.h>)
|
||||
# define FMT_USE_FLOAT128 1
|
||||
# endif
|
||||
// Clang emulates GCC, so it has to appear early.
|
||||
# if FMT_HAS_INCLUDE(<quadmath.h>)
|
||||
# define FMT_USE_FLOAT128 1
|
||||
# endif
|
||||
# elif defined(__GNUC__)
|
||||
// GNU C++:
|
||||
@ -1228,7 +1226,7 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int {
|
||||
FMT_INLINE auto do_count_digits(uint32_t n) -> int {
|
||||
// An optimization by Kendall Willets from https://bit.ly/3uOIQrB.
|
||||
// This increments the upper 32 bits (log10(T) - 1) when >= T is added.
|
||||
# define FMT_INC(T) (((sizeof(#T) - 1ull) << 32) - T)
|
||||
# define FMT_INC(T) (((sizeof(# T) - 1ull) << 32) - T)
|
||||
static constexpr uint64_t table[] = {
|
||||
FMT_INC(0), FMT_INC(0), FMT_INC(0), // 8
|
||||
FMT_INC(10), FMT_INC(10), FMT_INC(10), // 64
|
||||
@ -4310,9 +4308,7 @@ template <> struct formatter<bytes> {
|
||||
};
|
||||
|
||||
// group_digits_view is not derived from view because it copies the argument.
|
||||
template <typename T> struct group_digits_view {
|
||||
T value;
|
||||
};
|
||||
template <typename T> struct group_digits_view { T value; };
|
||||
|
||||
/**
|
||||
\rst
|
||||
|
Loading…
Reference in New Issue
Block a user