MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / or_else

Method or_else

extlibs/sol3/include/sol/sol.hpp:4285–4291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4283 /// \synopsis template <class F> optional<T> or_else (F &&f) &&;
4284 template <class F, detail::enable_if_ret_void<F>* = nullptr>
4285 optional<T> or_else(F&& f) && {
4286 if (has_value())
4287 return std::move(*this);
4288
4289 std::forward<F>(f)();
4290 return nullopt;
4291 }
4292
4293 /// \exclude
4294 template <class F, detail::disable_if_ret_void<F>* = nullptr>

Callers

nothing calls this directly

Calls 1

has_valueFunction · 0.85

Tested by

no test coverage detected