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

Function main

example/maximum.cpp:14–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13
14int main() {
15 // without a predicate
16 BOOST_HANA_CONSTANT_CHECK(
17 hana::maximum(hana::tuple_c<int, -1, 0, 2, -4, 6, 9>) == hana::int_c<9>
18 );
19
20 // with a predicate
21 auto smallest = hana::maximum(hana::tuple_c<int, -1, 0, 2, -4, 6, 9>, [](auto x, auto y) {
22 return x > y; // order is reversed!
23 });
24 BOOST_HANA_CONSTANT_CHECK(smallest == hana::int_c<-4>);
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected