Apply clang-format
This commit is contained in:
parent
03bf57a69e
commit
d02079a40f
@ -65,32 +65,27 @@ TEST(ranges_test, format_set) {
|
|||||||
"{\"one\", \"two\"}");
|
"{\"one\", \"two\"}");
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace adl
|
namespace adl {
|
||||||
{
|
struct box {
|
||||||
struct box {
|
int value;
|
||||||
int value;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
auto begin(box & b) noexcept -> int * {
|
auto begin(box& b) noexcept -> int* { return std::addressof(b.value); }
|
||||||
return std::addressof(b.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto end(box & b) noexcept -> int * {
|
auto end(box& b) noexcept -> int* { return std::addressof(b.value) + 1; }
|
||||||
return std::addressof(b.value) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto begin(const box & b) noexcept -> const int * {
|
auto begin(const box& b) noexcept -> const int* {
|
||||||
return std::addressof(b.value);
|
return std::addressof(b.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto end(const box & b) noexcept -> const int * {
|
auto end(const box& b) noexcept -> const int* {
|
||||||
return std::addressof(b.value) + 1;
|
return std::addressof(b.value) + 1;
|
||||||
}
|
}
|
||||||
} // namespace adl
|
} // namespace adl
|
||||||
|
|
||||||
TEST(ranges_test, format_adl_begin_end) {
|
TEST(ranges_test, format_adl_begin_end) {
|
||||||
auto b = adl::box{42};
|
auto b = adl::box{42};
|
||||||
EXPECT_EQ(fmt::format("{}", b), "[42]");
|
EXPECT_EQ(fmt::format("{}", b), "[42]");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ranges_test, format_pair) {
|
TEST(ranges_test, format_pair) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user