MCPcopy Create free account
hub / github.com/ThePhD/sol2 / conjunction

Method conjunction

include/sol/optional_implementation.hpp:1014–1017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1012 /// \returns `u` if `*this` has a value, otherwise an empty optional.
1013 template <class U>
1014 constexpr optional<typename std::decay<U>::type> conjunction(U&& u) const {
1015 using result = optional<detail::decay_t<U>>;
1016 return has_value() ? result { u } : result { nullopt };
1017 }
1018
1019 /// \returns `rhs` if `*this` is empty, otherwise the current value.
1020 /// \group disjunction

Callers

nothing calls this directly

Calls 1

has_valueFunction · 0.85

Tested by

no test coverage detected