MCPcopy Create free account
hub / github.com/boostorg/pfr / test_constexpr_comparable

Function test_constexpr_comparable

test/core/run/constexpr_ops.cpp:37–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36template <class T>
37void test_constexpr_comparable() {
38 using namespace boost::pfr;
39 constexpr T s1 {110, 1, true, 6,17,8,9,10,11};
40 constexpr T s2 = s1;
41 constexpr T s3 {110, 1, true, 6,17,8,9,10,11111};
42 static_assert(eq(s1, s2), "");
43 static_assert(le(s1, s2), "");
44 static_assert(ge(s1, s2), "");
45 static_assert(!ne(s1, s2), "");
46 static_assert(!eq(s1, s3), "");
47 static_assert(ne(s1, s3), "");
48 static_assert(lt(s1, s3), "");
49 static_assert(gt(s3, s2), "");
50 static_assert(le(s1, s3), "");
51 static_assert(ge(s3, s2), "");
52}
53
54namespace foo {
55struct comparable_struct {

Callers

nothing calls this directly

Calls 6

eqFunction · 0.85
leFunction · 0.85
geFunction · 0.85
neFunction · 0.85
ltFunction · 0.85
gtFunction · 0.85

Tested by

no test coverage detected