Skip to content

Commit

Permalink
fix gcc test
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Gray committed Nov 30, 2020
1 parent c3a8277 commit 761822a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions include/fmt/ranges.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ struct formatter<TupleT, Char, enable_if_t<fmt::is_tuple_like<TupleT>::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;
}

Expand Down Expand Up @@ -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(" ... <other elements>"));
break;
Expand Down
4 changes: 2 additions & 2 deletions test/enforce-compiletime-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 };

Expand Down

0 comments on commit 761822a

Please sign in to comment.