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

Function main

example/struct/foldable.cpp:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18};
19
20int main() {
21 constexpr Kitten kitten{5, 10, 0};
22
23 BOOST_HANA_CONSTEXPR_CHECK(
24 hana::fold_left(kitten, 0, [](auto total, auto member) {
25 // first(member) is the name of the member, here
26 // "extremely_cute", or "cute" or "not_so_cute",
27 // and second(member) is its value.
28 return hana::second(member) + total;
29 }) == (5 + 10 + 0)
30 );
31}

Callers

nothing calls this directly

Calls 1

secondClass · 0.85

Tested by

no test coverage detected