diff --git a/include/fmt/std.h b/include/fmt/std.h index 600ba7b111b7d..91f09f9a076d5 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -252,7 +251,7 @@ struct formatter(out, loc.line()); out = detail::write(out, Char(':')); out = detail::write(out, loc.column()); - out = detail::write(out, Char(' ')); + out = detail::write(out, ": "); out = detail::write(out, loc.function_name()); return out; } diff --git a/test/std-test.cc b/test/std-test.cc index 0931aa33d1472..7681a4322425b 100644 --- a/test/std-test.cc +++ b/test/std-test.cc @@ -67,7 +67,7 @@ TEST(std_test, source_location) { // We don't know the full path of this file so we only check the end of the // path. EXPECT_TRUE(fmt::format("{}", std::source_location::current()) - .ends_with("std-test.cc:69:3 virtual void " + .ends_with("std-test.cc:69:3: virtual void " "std_test_source_location_Test::TestBody()")); } #endif