Commit f60a42e0 authored by Max Kellermann's avatar Max Kellermann

Log, client/Response: adapt to libfmt 8.0.0 API changes

parent 85b0029b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment