MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / get_or

Method get_or

extern/boost/boost/thread/future.hpp:2230–2240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2228
2229 template <typename R2>
2230 typename boost::disable_if< is_void<R2>, typename detail::shared_state<R>::shared_future_get_result_type>::type
2231 get_or(BOOST_THREAD_RV_REF(R2) v) const // EXTENSION
2232 {
2233 if(!this->future_)
2234 {
2235 boost::throw_exception(future_uninitialized());
2236 }
2237 this->future_->wait();
2238 if (this->future_->has_value()) return this->future_->get_sh();
2239 else return boost::move(v);
2240 }
2241
2242#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
2243 template<typename F>

Callers 2

operator()Method · 0.45
operator()Method · 0.45

Calls 5

get_shMethod · 0.80
throw_exceptionFunction · 0.50
moveFunction · 0.50
waitMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected