diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2020-03-23 20:16:39 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-24 17:16:26 +0000 |
commit | 60d5baecdfe0d9e7db37bfc1194dbc8eef4cf50d (patch) | |
tree | 8b0190b7f2222a94d40ed8172d11b10e6038f44c /src/mongo/util | |
parent | 40112eca43bbb3b84aa738bacec73c3a9e32e5b9 (diff) | |
download | mongo-60d5baecdfe0d9e7db37bfc1194dbc8eef4cf50d.tar.gz |
SERVER-47064 Use std::invoke_result instead of std::result_of
Diffstat (limited to 'src/mongo/util')
-rw-r--r-- | src/mongo/util/future_test_utils.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/util/future_test_utils.h b/src/mongo/util/future_test_utils.h index 551e95b7b64..6c569a848ed 100644 --- a/src/mongo/util/future_test_utils.h +++ b/src/mongo/util/future_test_utils.h @@ -125,7 +125,7 @@ inline void sleepIfShould() { #endif } -template <typename Func, typename Result = std::result_of_t<Func && ()>> +template <typename Func, typename Result = std::invoke_result_t<Func&&>> Future<Result> async(Func&& func) { auto pf = makePromiseFuture<Result>(); @@ -158,7 +158,7 @@ inline Status failStatus() { template <DoExecutorFuture doExecutorFuture = kDoExecutorFuture, typename CompletionFunc, typename TestFunc, - typename = std::enable_if_t<!std::is_void<std::result_of_t<CompletionFunc()>>::value>> + typename = std::enable_if_t<!std::is_void<std::invoke_result_t<CompletionFunc>>::value>> void FUTURE_SUCCESS_TEST(const CompletionFunc& completion, const TestFunc& test) { using CompletionType = decltype(completion()); { // immediate future @@ -183,7 +183,7 @@ void FUTURE_SUCCESS_TEST(const CompletionFunc& completion, const TestFunc& test) template <DoExecutorFuture doExecutorFuture = kDoExecutorFuture, typename CompletionFunc, typename TestFunc, - typename = std::enable_if_t<std::is_void<std::result_of_t<CompletionFunc()>>::value>, + typename = std::enable_if_t<std::is_void<std::invoke_result_t<CompletionFunc>>::value>, typename = void> void FUTURE_SUCCESS_TEST(const CompletionFunc& completion, const TestFunc& test) { using CompletionType = decltype(completion()); |