| 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> |
no test coverage detected