| 580 | typename OnComplete = ThenOnComplete<OnSuccess, OnFailure>, |
| 581 | typename ContinuedFuture = typename OnComplete::ContinuedFuture> |
| 582 | ContinuedFuture Then(OnSuccess on_success, OnFailure on_failure = {}, |
| 583 | CallbackOptions options = CallbackOptions::Defaults()) const { |
| 584 | auto next = ContinuedFuture::Make(); |
| 585 | AddCallback(OnComplete{std::forward<OnSuccess>(on_success), |
| 586 | std::forward<OnFailure>(on_failure), next}, |
| 587 | options); |
| 588 | return next; |
| 589 | } |
| 590 | |
| 591 | /// \brief Implicit constructor to create a finished future from a value |
| 592 | Future(ValueType val) : Future() { // NOLINT runtime/explicit |