Applied clang-format (possibly correctly)
This commit is contained in:
parent
c0984ebc45
commit
562719df5f
@ -270,7 +270,10 @@ struct cpp20_only_range {
|
||||
iterator() = default;
|
||||
iterator(int i) : val(i) {}
|
||||
int operator*() const { return val; }
|
||||
iterator& operator++() { ++val; return *this; }
|
||||
iterator& operator++() {
|
||||
++val;
|
||||
return *this;
|
||||
}
|
||||
void operator++(int) { ++*this; }
|
||||
bool operator==(const iterator& rhs) const { return val == rhs.val; }
|
||||
};
|
||||
@ -311,8 +314,11 @@ TEST(ranges_test, join_range) {
|
||||
EXPECT_EQ(fmt::format("{}", fmt::join(z, ",")), "0,0,0");
|
||||
|
||||
# ifdef __cpp_lib_ranges
|
||||
EXPECT_EQ(fmt::format("{}", cpp20_only_range{.lo=0, .hi=5}), "[0, 1, 2, 3, 4]");
|
||||
EXPECT_EQ(fmt::format("{}", fmt::join(cpp20_only_range{.lo=0, .hi=5}, ",")), "0,1,2,3,4");
|
||||
EXPECT_EQ(fmt::format("{}", cpp20_only_range{.lo = 0, .hi = 5}),
|
||||
"[0, 1, 2, 3, 4]");
|
||||
EXPECT_EQ(
|
||||
fmt::format("{}", fmt::join(cpp20_only_range{.lo = 0, .hi = 5}, ",")),
|
||||
"0,1,2,3,4");
|
||||
# endif
|
||||
}
|
||||
#endif // FMT_RANGES_TEST_ENABLE_JOIN
|
||||
|
||||
Loading…
Reference in New Issue
Block a user