diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index 05ad4952..b1bd0efc 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -292,9 +292,9 @@ struct formatter::value>> { out = detail::copy(formatting.delimiter, out); } out = vformat_to(out, - detail::format_str_quoted( - (formatting.add_delimiter_spaces && i > 0), v), - make_format_args(v)); + to_string_view(detail::format_str_quoted( + (formatting.add_delimiter_spaces && i > 0), v)), + make_format_args(v)); ++i; } @@ -367,9 +367,9 @@ struct formatter< out = detail::copy(formatting.delimiter, out); } out = vformat_to(out, - detail::format_str_quoted( - (formatting.add_delimiter_spaces && i > 0), *it), - make_format_args(*it)); + to_string_view(detail::format_str_quoted( + (formatting.add_delimiter_spaces && i > 0), *it)), + make_format_args(*it)); if (++i > formatting.range_length_limit) { out = format_to(out, FMT_STRING(" ... ")); break; diff --git a/test/enforce-compiletime-test.cc b/test/enforce-compiletime-test.cc index 27a5c561..6bda4ab7 100644 --- a/test/enforce-compiletime-test.cc +++ b/test/enforce-compiletime-test.cc @@ -114,7 +114,7 @@ TEST(FormatTest, CustomFormatCompileTimeString) { EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), const_answer)); } -#if FMT_USE_USER_DEFINED_LITERALS +#if FMT_USE_UDL_TEMPLATE // Passing user-defined literals directly to EXPECT_EQ causes problems // with macro argument stringification (#) on some versions of GCC. // Workaround: Assing the UDL result to a variable before the macro. @@ -128,7 +128,7 @@ TEST(LiteralsTest, Format) { EXPECT_EQ(L"abc1", udl_format_w); } -#endif // FMT_USE_USER_DEFINED_LITERALS +#endif // FMT_USE_UDL_TEMPLATE enum TestEnum { A };