From 9e3ef542877ac62a46e21703ca105f733c47bb64 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 3 May 2018 13:40:15 +0100 Subject: [PATCH] Use std::invoke_result in std::async instead of std::result_of * include/std/future (__async_result_of): Use __invoke_result instead of result_of. From-SVN: r259888 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/include/std/future | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 692a46869fc..9356e47ec98 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2018-05-03 Jonathan Wakely + * include/std/future (__async_result_of): Use __invoke_result instead + of result_of. + * include/std/any (any_cast): Use __remove_cvref_t. * include/std/tuple (__make_tuple): Likewise. * include/std/type_traits (__remove_cvref_t): Define. diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index f9ad5666f52..c17a253d26e 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -181,8 +181,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2021. Further incorrect usages of result_of template - using __async_result_of = typename result_of< - typename decay<_Fn>::type(typename decay<_Args>::type...)>::type; + using __async_result_of = typename __invoke_result< + typename decay<_Fn>::type, typename decay<_Args>::type...>::type; template future<__async_result_of<_Fn, _Args...>> -- 2.30.2