Skip to content

Commit

Permalink
fix weird compile error in SemiFuture::within
Browse files Browse the repository at this point in the history
Summary:
Blames to {D60095691}.

```
folly/futures/Future-inl.h:2144:11: error: unused type alias 'Base' [-Werror,-Wunused-local-typedef]
    using Base = futures::detail::WithinContextBase;
          ^
```

Reviewed By: Gownta

Differential Revision: D60146633

fbshipit-source-id: 8307635dfa22de7d9c7752da5c330dba661a6303
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Jul 24, 2024
1 parent bac3a45 commit 69021b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions folly/futures/Future-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2140,14 +2140,16 @@ SemiFuture<T> SemiFuture<T>::within(
return std::move(*this);
}

struct Context : futures::detail::WithinContextBase {
using Base = futures::detail::WithinContextBase;
static void goPromiseSetException(Base& base, exception_wrapper&& e) {
using ContextBase = futures::detail::WithinContextBase;
struct Context : ContextBase {
static void goPromiseSetException(
ContextBase& base, exception_wrapper&& e) {
static_cast<Context&>(base).promise.setException(std::move(e));
}
Promise<T> promise;
explicit Context(E ex)
: Base(goPromiseSetException, exception_wrapper(std::move(ex))) {}
: ContextBase(goPromiseSetException, exception_wrapper(std::move(ex))) {
}
};

std::shared_ptr<Timekeeper> tks;
Expand Down

0 comments on commit 69021b6

Please sign in to comment.