Fix compilation errors due to make_format_args in gcc 14.1.1 with c++20 (#4042)

This commit is contained in:
toge 2024-07-04 04:41:08 +09:00 committed by GitHub
parent c4f6fa7135
commit 9d946a2fc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -569,8 +569,8 @@ using wprintf_args = basic_format_args<wprintf_context>;
/// arguments and can be implicitly converted to `printf_args`.
template <typename Char = char, typename... T>
inline auto make_printf_args(T&... args)
-> decltype(make_format_args<basic_printf_context<Char>>(args...)) {
return make_format_args<basic_printf_context<Char>>(args...);
-> decltype(fmt::make_format_args<basic_printf_context<Char>>(args...)) {
return fmt::make_format_args<basic_printf_context<Char>>(args...);
}
template <typename Char> struct vprintf_args {

View File

@ -6,6 +6,10 @@
// For the license information refer to format.h.
#include "fmt/printf.h"
// include <format> if possible for https://github.com/fmtlib/fmt/pull/4042
#if FMT_HAS_INCLUDE(<format>) && FMT_CPLUSPLUS > 201703L
# include <format>
#endif
#include <cctype>
#include <climits>