Use std::invoke_result in std::async instead of std::result_of
authorJonathan Wakely <jwakely@redhat.com>
Thu, 3 May 2018 12:40:15 +0000 (13:40 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 3 May 2018 12:40:15 +0000 (13:40 +0100)
* include/std/future (__async_result_of): Use __invoke_result instead
of result_of.

From-SVN: r259888

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/future

index 692a46869fc24b39f2d81ea2b1ebe45dc9c5193d..9356e47ec98d20fd6f4489d2662f4102b9594a53 100644 (file)
@@ -1,5 +1,8 @@
 2018-05-03  Jonathan Wakely  <jwakely@redhat.com>
 
+       * 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.
index f9ad5666f52abdb9d24324ab429bedac88419795..c17a253d26ec7455d4089f1644238f3fbb8381ba 100644 (file)
@@ -181,8 +181,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   // _GLIBCXX_RESOLVE_LIB_DEFECTS
   // 2021. Further incorrect usages of result_of
   template<typename _Fn, typename... _Args>
-    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<typename _Fn, typename... _Args>
     future<__async_result_of<_Fn, _Args...>>