Commit 8410273e authored by Joe Loser's avatar Joe Loser Committed by Facebook Github Bot

Use remove_cvref_t in Future-inl.h (#1099)

Summary:
- Replace a wordy type alias in `Future-inl.h` to use `remove_cvref_t`.
Pull Request resolved: https://github.com/facebook/folly/pull/1099

Differential Revision: D14721023

Pulled By: yfeldblum

fbshipit-source-id: e9de76a851162163046dfa088a8cc7e5a075562c
parent 45374fbd
......@@ -22,6 +22,7 @@
#include <utility>
#include <folly/Optional.h>
#include <folly/Traits.h>
#include <folly/executors/ExecutorWithPriority.h>
#include <folly/executors/InlineExecutor.h>
#include <folly/executors/QueuedImmediateExecutor.h>
......@@ -1074,9 +1075,8 @@ template <typename R, typename Caller, typename... Args>
Future<typename isFuture<R>::Inner> Future<T>::then(
R (Caller::*func)(Args...),
Caller* instance) && {
typedef typename std::remove_cv<typename std::remove_reference<
typename futures::detail::ArgType<Args...>::FirstArg>::type>::type
FirstArg;
using FirstArg =
remove_cvref_t<typename futures::detail::ArgType<Args...>::FirstArg>;
return std::move(*this).thenTry([instance, func](Try<T>&& t) {
return (instance->*func)(t.template get<isTry<FirstArg>::value, Args>()...);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment