[v3 patch] remove __async_sfinae_helper
Jonathan Wakely
jwakely.gcc@gmail.com
Mon Dec 17 21:31:00 GMT 2012
With the implementation of N3436 we no longer need the
__async_sfinae_helper, as result_of does the same job on its own.
* include/std/future (__async_sfinae_helper): Remove.
Tested x86_64-linux, committed to trunk.
-------------- next part --------------
commit 797f96cc81e09197bc377206319667c579ecb81b
Author: Jonathan Wakely <jwakely.gcc@gmail.com>
Date: Mon Dec 17 21:00:57 2012 +0000
* include/std/future (__async_sfinae_helper): Remove.
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index c24ab77..2ecf438 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -170,19 +170,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
future<typename result_of<_Fn(_Args...)>::type>
async(launch __policy, _Fn&& __fn, _Args&&... __args);
- template<typename _FnCheck, typename _Fn, typename... _Args>
- struct __async_sfinae_helper
- {
- typedef future<typename result_of<_Fn(_Args...)>::type> type;
- };
-
template<typename _Fn, typename... _Args>
- struct __async_sfinae_helper<launch, _Fn, _Args...>
- { };
-
- template<typename _Fn, typename... _Args>
- typename
- __async_sfinae_helper<typename decay<_Fn>::type, _Fn, _Args...>::type
+ future<typename result_of<_Fn(_Args...)>::type>
async(_Fn&& __fn, _Args&&... __args);
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
@@ -1509,8 +1498,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// async, potential overload
template<typename _Fn, typename... _Args>
- inline typename
- __async_sfinae_helper<typename decay<_Fn>::type, _Fn, _Args...>::type
+ inline future<typename result_of<_Fn(_Args...)>::type>
async(_Fn&& __fn, _Args&&... __args)
{
return async(launch::async|launch::deferred, std::forward<_Fn>(__fn),
More information about the Libstdc++
mailing list