MCPcopy Create free account
hub / github.com/boostorg/leaf / test

Function test

test/result_load_test.cpp:20–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19template <class T>
20leaf::result<T> test()
21{
22 leaf::result<T> r1 = leaf::new_error(info<42>{40});
23 leaf::result<T> r2 = r1.load(info<1>{});
24 leaf::result<T> r3 = r2.load(info<2>{2}, []{ return info<3>{3}; });
25 leaf::result<T> r4 = r3.load([](info<42> & x){ ++x.value; });
26 leaf::result<T> r5 = r4.load([](info<42> & x){ ++x.value; }, [](info<1> & x){ ++x.value; });
27 return r5;
28}
29
30int main()
31{

Callers

nothing calls this directly

Calls 2

new_errorFunction · 0.85
loadMethod · 0.80

Tested by

no test coverage detected