MCPcopy Create free account
hub / github.com/boostorg/hana / main

Function main

test/optional/chain.cpp:15–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15int main() {
16 auto f = [](auto x) {
17 return hana::just(hana::test::_injection<0>{}(x));
18 };
19
20 BOOST_HANA_CONSTANT_CHECK(hana::equal(
21 hana::chain(hana::just(ct_eq<3>{}), f),
22 f(ct_eq<3>{})
23 ));
24
25 BOOST_HANA_CONSTANT_CHECK(hana::equal(
26 hana::chain(hana::nothing, f),
27 hana::nothing
28 ));
29
30 // test with operators
31 BOOST_HANA_CONSTANT_CHECK(hana::equal(
32 hana::just(ct_eq<3>{}) | f,
33 f(ct_eq<3>{})
34 ));
35
36 BOOST_HANA_CONSTANT_CHECK(hana::equal(
37 hana::nothing | f,
38 hana::nothing
39 ));
40}

Callers

nothing calls this directly

Calls 2

equalClass · 0.50
fClass · 0.50

Tested by

no test coverage detected