MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / sequence

Method sequence

source/core/StarMaybe.hpp:375–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373template <typename T>
374template <typename Function>
375auto Maybe<T>::sequence(Function function) const -> decltype(function(std::declval<T>())) {
376 if (!isValid())
377 return {};
378 return function(get());
379}
380
381template <typename T>
382std::ostream& operator<<(std::ostream& os, Maybe<T> const& v) {

Callers 1

updateMethod · 0.45

Calls 1

getFunction · 0.85

Tested by

no test coverage detected