Skip to content

Commit

Permalink
Fix compilation errors due to make_format_args in gcc 14.1.1 with c…
Browse files Browse the repository at this point in the history
…++20 (#4042)
  • Loading branch information
toge authored Jul 3, 2024
1 parent c4f6fa7 commit 9d946a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions test/printf-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 9d946a2

Please sign in to comment.