diff --git a/test/format-test.cc b/test/format-test.cc index b2517e2799ef..a15565205d27 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1323,7 +1323,11 @@ TEST(FormatTest, Dynamic) { args.emplace_back(fmt::internal::make_arg("abc1")); args.emplace_back(fmt::internal::make_arg(1.2f)); - std::string result = fmt::vformat("{} and {} and {}", fmt::basic_format_args(args.data(), (unsigned)args.size())); + std::string result = fmt::vformat("{} and {} and {}", + fmt::basic_format_args( + args.data(), + static_cast(args.size()))); + EXPECT_EQ("42 and abc1 and 1.2", result); }