summaryrefslogtreecommitdiff
path: root/src/mongo/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util')
-rw-r--r--src/mongo/util/future_test_utils.h6
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());