Log, client/Response: adapt to libfmt 8.0.0 API changes
This commit is contained in:
parent
85b0029ba2
commit
f60a42e0b6
@ -35,7 +35,11 @@ LogVFmt(LogLevel level, const Domain &domain,
|
||||
fmt::string_view format_str, fmt::format_args args) noexcept
|
||||
{
|
||||
fmt::memory_buffer buffer;
|
||||
#if FMT_VERSION >= 80000
|
||||
fmt::vformat_to(std::back_inserter(buffer), format_str, args);
|
||||
#else
|
||||
fmt::vformat_to(buffer, format_str, args);
|
||||
#endif
|
||||
Log(level, domain, {buffer.data(), buffer.size()});
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "util/Compiler.h"
|
||||
|
||||
#include <fmt/core.h>
|
||||
#if FMT_VERSION < 70000
|
||||
#if FMT_VERSION < 70000 || FMT_VERSION >= 80000
|
||||
#include <fmt/format.h>
|
||||
#endif
|
||||
|
||||
|
@ -44,7 +44,11 @@ bool
|
||||
Response::VFmt(fmt::string_view format_str, fmt::format_args args) noexcept
|
||||
{
|
||||
fmt::memory_buffer buffer;
|
||||
#if FMT_VERSION >= 80000
|
||||
fmt::vformat_to(std::back_inserter(buffer), format_str, args);
|
||||
#else
|
||||
fmt::vformat_to(buffer, format_str, args);
|
||||
#endif
|
||||
return Write(buffer.data(), buffer.size());
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "protocol/Ack.hxx"
|
||||
|
||||
#include <fmt/core.h>
|
||||
#if FMT_VERSION < 70000
|
||||
#if FMT_VERSION < 70000 || FMT_VERSION >= 80000
|
||||
#include <fmt/format.h>
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user