generic template (1) | void set_value_at_thread_exit (const T& val);void set_value_at_thread_exit (T&& val); |
---|---|
specializations (2) | void promise<R&>::set_value_at_thread_exit (R& val); // when T is a reference type (R&)void promise<void>::set_value_at_thread_exit (void); // when T is void |
exception type | error condition | 描述 |
---|---|---|
future_error | future_errc::no_state | 該物件沒有共享狀態(它已被移動賦值) |
future_error | future_errc::promise_already_satisfied | 共享狀態已儲存值或異常 |