| 602 | typename OnComplete = ThenOnComplete<OnSuccess, OnFailure>, |
| 603 | typename ContinuedFuture = typename OnComplete::ContinuedFuture> |
| 604 | ContinuedFuture Then(OnSuccess on_success, OnFailure on_failure = {}, |
| 605 | CallbackOptions options = CallbackOptions::Defaults()) const { |
| 606 | auto next = ContinuedFuture::Make(); |
| 607 | AddCallback(OnComplete{std::forward<OnSuccess>(on_success), |
| 608 | std::forward<OnFailure>(on_failure), next}, |
| 609 | options); |
| 610 | return next; |
| 611 | } |
| 612 | |
| 613 | /// \brief Implicit constructor to create a finished future from a value |
| 614 | Future(ValueType val) : Future() { // NOLINT runtime/explicit |