libfmt 9 support
libfmt version 9 broke the API by removing fmt::make_args_checked(). Fixes https://bugs.debian.org/1014543
This commit is contained in:
parent
2ee57f9b0d
commit
138738075b
1
NEWS
1
NEWS
|
@ -3,6 +3,7 @@ ver 0.23.8 (not yet released)
|
||||||
- curl: fix crash if web server does not understand WebDAV
|
- curl: fix crash if web server does not understand WebDAV
|
||||||
* output
|
* output
|
||||||
- pipewire: fix crash with PipeWire 0.3.53
|
- pipewire: fix crash with PipeWire 0.3.53
|
||||||
|
* support libfmt 9
|
||||||
|
|
||||||
ver 0.23.7 (2022/05/09)
|
ver 0.23.7 (2022/05/09)
|
||||||
* database
|
* database
|
||||||
|
|
|
@ -45,7 +45,10 @@ void
|
||||||
LogFmt(LogLevel level, const Domain &domain,
|
LogFmt(LogLevel level, const Domain &domain,
|
||||||
const S &format_str, Args&&... args) noexcept
|
const S &format_str, Args&&... args) noexcept
|
||||||
{
|
{
|
||||||
#if FMT_VERSION >= 70000
|
#if FMT_VERSION >= 90000
|
||||||
|
return LogVFmt(level, domain, format_str,
|
||||||
|
fmt::make_format_args(args...));
|
||||||
|
#elif FMT_VERSION >= 70000
|
||||||
return LogVFmt(level, domain, fmt::to_string_view(format_str),
|
return LogVFmt(level, domain, fmt::to_string_view(format_str),
|
||||||
fmt::make_args_checked<Args...>(format_str,
|
fmt::make_args_checked<Args...>(format_str,
|
||||||
args...));
|
args...));
|
||||||
|
|
|
@ -82,7 +82,10 @@ public:
|
||||||
|
|
||||||
template<typename S, typename... Args>
|
template<typename S, typename... Args>
|
||||||
bool Fmt(const S &format_str, Args&&... args) noexcept {
|
bool Fmt(const S &format_str, Args&&... args) noexcept {
|
||||||
#if FMT_VERSION >= 70000
|
#if FMT_VERSION >= 90000
|
||||||
|
return VFmt(format_str,
|
||||||
|
fmt::make_format_args(args...));
|
||||||
|
#elif FMT_VERSION >= 70000
|
||||||
return VFmt(fmt::to_string_view(format_str),
|
return VFmt(fmt::to_string_view(format_str),
|
||||||
fmt::make_args_checked<Args...>(format_str,
|
fmt::make_args_checked<Args...>(format_str,
|
||||||
args...));
|
args...));
|
||||||
|
@ -109,7 +112,10 @@ public:
|
||||||
template<typename S, typename... Args>
|
template<typename S, typename... Args>
|
||||||
void FmtError(enum ack code,
|
void FmtError(enum ack code,
|
||||||
const S &format_str, Args&&... args) noexcept {
|
const S &format_str, Args&&... args) noexcept {
|
||||||
#if FMT_VERSION >= 70000
|
#if FMT_VERSION >= 90000
|
||||||
|
return VFmtError(code, format_str,
|
||||||
|
fmt::make_format_args(args...));
|
||||||
|
#elif FMT_VERSION >= 70000
|
||||||
return VFmtError(code, fmt::to_string_view(format_str),
|
return VFmtError(code, fmt::to_string_view(format_str),
|
||||||
fmt::make_args_checked<Args...>(format_str,
|
fmt::make_args_checked<Args...>(format_str,
|
||||||
args...));
|
args...));
|
||||||
|
|
Loading…
Reference in New Issue