Make specifiers support in tuple_join an opt-in

This commit is contained in:
Victor Zverovich
2021-09-05 07:34:06 -07:00
parent 3940de5952
commit 2fe94ad7e3
2 changed files with 11 additions and 0 deletions

View File

@@ -225,6 +225,7 @@ TEST(ranges_test, join_tuple) {
auto t4 = std::tuple<float>(4.0f);
EXPECT_EQ(fmt::format("{}", fmt::join(t4, "/")), "4");
# if FMT_TUPLE_JOIN_SPECIFIERS
// Specs applied to each element.
auto t5 = std::tuple<int, int, long>(-3, 100, 1);
EXPECT_EQ(fmt::format("{:+03}", fmt::join(t5, ", ")), "-03, +100, +01");
@@ -237,6 +238,7 @@ TEST(ranges_test, join_tuple) {
int y = -1;
auto t7 = std::tuple<int, int&, const int&>(3, y, y);
EXPECT_EQ(fmt::format("{:03}", fmt::join(t7, ", ")), "003, -01, -01");
# endif
}
TEST(ranges_test, join_initializer_list) {