mirror of
https://github.com/fmtlib/fmt.git
synced 2026-02-05 17:30:06 +08:00
Stop doing heroics for pathological user code
This commit is contained in:
parent
45f230b9b2
commit
b2a96c6087
@ -235,7 +235,6 @@ FMT_PRAGMA_GCC(push_options)
|
||||
FMT_PRAGMA_GCC(optimize("Og"))
|
||||
#endif
|
||||
FMT_PRAGMA_CLANG(diagnostic push)
|
||||
FMT_PRAGMA_GCC(diagnostic push)
|
||||
|
||||
#ifdef FMT_ALWAYS_INLINE
|
||||
// Use the provided definition.
|
||||
@ -2794,8 +2793,6 @@ template <typename Context = context, typename... T,
|
||||
ullong DESC = detail::make_descriptor<Context, T...>()>
|
||||
constexpr FMT_ALWAYS_INLINE auto make_format_args(T&... args)
|
||||
-> detail::format_arg_store<Context, NUM_ARGS, NUM_NAMED_ARGS, DESC> {
|
||||
// Suppress warnings for pathological types convertible to detail::value.
|
||||
FMT_PRAGMA_GCC(diagnostic ignored "-Wconversion")
|
||||
return {{args...}};
|
||||
}
|
||||
|
||||
@ -2968,7 +2965,6 @@ FMT_INLINE void println(format_string<T...> fmt, T&&... args) {
|
||||
return fmt::println(stdout, fmt, static_cast<T&&>(args)...);
|
||||
}
|
||||
|
||||
FMT_PRAGMA_GCC(diagnostic pop)
|
||||
FMT_PRAGMA_CLANG(diagnostic pop)
|
||||
FMT_PRAGMA_GCC(pop_options)
|
||||
FMT_END_EXPORT
|
||||
|
||||
@ -10,6 +10,9 @@
|
||||
#include "test-assert.h"
|
||||
// clang-format on
|
||||
|
||||
// Suppress warnings for pathological types convertible to detail::value.
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
|
||||
#include "fmt/base.h"
|
||||
|
||||
#include <limits.h> // INT_MAX
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user