mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 11:14:41 +00:00
Cleanup
This commit is contained in:
parent
45b772f85c
commit
5af88653eb
@ -761,28 +761,22 @@ using is_integer =
|
||||
# define FMT_USE_LONG_DOUBLE 1
|
||||
#endif
|
||||
|
||||
#ifndef FMT_USE_FLOAT128
|
||||
# ifdef __clang__
|
||||
// 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++:
|
||||
# if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__)
|
||||
# define FMT_USE_FLOAT128 1
|
||||
# endif
|
||||
# endif
|
||||
# ifndef FMT_USE_FLOAT128
|
||||
# define FMT_USE_FLOAT128 0
|
||||
# endif
|
||||
#if defined(FMT_USE_FLOAT128)
|
||||
// Use the provided definition.
|
||||
#elif FMT_CLANG_VERSION && FMT_HAS_INCLUDE(<quadmath.h>)
|
||||
# define FMT_USE_FLOAT128 1
|
||||
#elif FMT_GCC_VERSION && defined(_GLIBCXX_USE_FLOAT128) && \
|
||||
!defined(__STRICT_ANSI__)
|
||||
# define FMT_USE_FLOAT128 1
|
||||
#else
|
||||
# define FMT_USE_FLOAT128 0
|
||||
#endif
|
||||
|
||||
#if FMT_USE_FLOAT128
|
||||
using float128 = __float128;
|
||||
#else
|
||||
using float128 = void;
|
||||
#endif
|
||||
|
||||
template <typename T> using is_float128 = std::is_same<T, float128>;
|
||||
|
||||
template <typename T>
|
||||
|
@ -1793,15 +1793,14 @@ struct deadlockable {
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
template <> struct formatter<deadlockable> {
|
||||
FMT_CONSTEXPR auto parse(fmt::format_parse_context& ctx)
|
||||
-> decltype(ctx.begin()) {
|
||||
FMT_CONSTEXPR auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
|
||||
return ctx.begin();
|
||||
}
|
||||
|
||||
auto format(const deadlockable& d, fmt::format_context& ctx) const
|
||||
auto format(const deadlockable& d, format_context& ctx) const
|
||||
-> decltype(ctx.out()) {
|
||||
std::lock_guard<std::mutex> lock(d.mutex);
|
||||
return fmt::format_to(ctx.out(), "{}", d.value);
|
||||
return format_to(ctx.out(), "{}", d.value);
|
||||
}
|
||||
};
|
||||
FMT_END_NAMESPACE
|
||||
|
Loading…
Reference in New Issue
Block a user