#1838 Fix C++20 compile error.

std::format does not support named arguments, like fmt::arg.
pull/3112/head
Patrick Rotsaert 1 year ago
parent acae7a76ad
commit 94d55bf48e

@ -63,13 +63,11 @@ TEST_CASE("ansicolor_file_logger", "[ansicolor_logger]") {
logger->flush(); logger->flush();
require_message_count(SIMPLE_LOG, 2); require_message_count(SIMPLE_LOG, 2);
using spdlog::details::os::default_eol; using spdlog::details::os::default_eol;
REQUIRE(file_contents(SIMPLE_LOG) == REQUIRE(file_contents(SIMPLE_LOG) == spdlog::fmt_lib::format("[{0}+++{1}] Test message 1{2}"
spdlog::fmt_lib::format( "[{0}+++{1}] Test message 2{2}",
"[{ansi_blue}+++{ansi_reset}] Test message 1{eol}" spdlog::details::ansicolors::blue,
"[{ansi_blue}+++{ansi_reset}] Test message 2{eol}", spdlog::details::ansicolors::reset,
spdlog::fmt_lib::arg("ansi_blue", spdlog::details::ansicolors::blue), default_eol));
spdlog::fmt_lib::arg("ansi_reset", spdlog::details::ansicolors::reset),
spdlog::fmt_lib::arg("eol", default_eol)));
} }
TEST_CASE("rotating_file_logger1", "[rotating_logger]") { TEST_CASE("rotating_file_logger1", "[rotating_logger]") {

Loading…
Cancel
Save