Fixed format_to deprecated warning by wrapping the buffer with std::back_inserter

This commit is contained in:
gabime
2021-06-24 17:07:14 +03:00
parent 5887744d8b
commit 7b14a65b2b
6 changed files with 13 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ using spdlog::details::file_helper;
static void write_with_helper(file_helper &helper, size_t howmany)
{
spdlog::memory_buf_t formatted;
fmt::format_to(formatted, "{}", std::string(howmany, '1'));
fmt::format_to(std::back_inserter(formatted), "{}", std::string(howmany, '1'));
helper.write(formatted);
helper.flush();
}