MCPcopy Create free account
hub / github.com/citp/BlockSci / mapOptionalOptional

Function mapOptionalOptional

blockscipy/src/generic_proxy/optional_map.cpp:32–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31 template<typename R>
32 Proxy<ranges::optional<R>> mapOptionalOptional(OptionalProxy &p, Proxy<ranges::optional<R>> &p2) {
33 return liftGeneric(p, [p2](auto && opt) -> ranges::optional<R> {
34 if (opt) {
35 return p2(opt->toAny());
36 } else {
37 return ranges::nullopt;
38 }
39 });
40 }
41
42 template <typename T>
43 void addOptionalProxyMapMethodsImpl(pybind11::class_<OptionalProxy, RangeProxy> &cl) {

Callers

nothing calls this directly

Calls 2

liftGenericFunction · 0.85
toAnyMethod · 0.45

Tested by

no test coverage detected