diff --git a/include/boost/fiber/future/async.hpp b/include/boost/fiber/future/async.hpp index 9606c4e2..3b221524 100644 --- a/include/boost/fiber/future/async.hpp +++ b/include/boost/fiber/future/async.hpp @@ -21,73 +21,73 @@ namespace boost { namespace fibers { -template< class Function, class ... Args > +template< typename Fn, typename ... Args > future< typename std::result_of< - typename std::decay< Function >::type( typename std::decay< Args >::type ... ) + typename std::decay< Fn >::type( typename std::decay< Args >::type ... ) >::type > -async( launch policy, Function && fn, Args && ... args) { +async( launch policy, Fn && fn, Args && ... args) { typedef typename std::result_of< - typename std::decay< Function >::type( typename std::decay< Args >::type ... ) + typename std::decay< Fn >::type( typename std::decay< Args >::type ... ) >::type result_t; packaged_task< result_t( typename std::decay< Args >::type ... ) > pt{ - std::forward< Function >( fn) }; + std::forward< Fn >( fn) }; future< result_t > f{ pt.get_future() }; fiber{ policy, std::move( pt), std::forward< Args >( args) ... }.detach(); return f; } -template< class Function, class ... Args > +template< typename Fn, typename ... Args > future< typename std::result_of< - typename std::decay< Function >::type( typename std::decay< Args >::type ... ) + typename std::decay< Fn >::type( typename std::decay< Args >::type ... ) >::type > -async( Function && fn, Args && ... args) { +async( Fn && fn, Args && ... args) { typedef typename std::result_of< - typename std::decay< Function >::type( typename std::decay< Args >::type ... ) + typename std::decay< Fn >::type( typename std::decay< Args >::type ... ) >::type result_t; packaged_task< result_t( typename std::decay< Args >::type ... ) > pt{ - std::forward< Function >( fn) }; + std::forward< Fn >( fn) }; future< result_t > f{ pt.get_future() }; fiber{ std::move( pt), std::forward< Args >( args) ... }.detach(); return f; } -template< typename StackAllocator, class Function, class ... Args > +template< typename StackAllocator, typename Fn, typename ... Args > future< typename std::result_of< - typename std::decay< Function >::type( typename std::decay< Args >::type ... ) + typename std::decay< Fn >::type( typename std::decay< Args >::type ... ) >::type > -async( launch policy, std::allocator_arg_t, StackAllocator salloc, Function && fn, Args && ... args) { +async( launch policy, std::allocator_arg_t, StackAllocator salloc, Fn && fn, Args && ... args) { typedef typename std::result_of< - typename std::decay< Function >::type( typename std::decay< Args >::type ... ) + typename std::decay< Fn >::type( typename std::decay< Args >::type ... ) >::type result_t; packaged_task< result_t( typename std::decay< Args >::type ... ) > pt{ - std::allocator_arg, salloc, std::forward< Function >( fn) }; + std::allocator_arg, salloc, std::forward< Fn >( fn) }; future< result_t > f{ pt.get_future() }; fiber{ policy, std::move( pt), std::forward< Args >( args) ... }.detach(); return f; } -template< typename StackAllocator, class Function, class ... Args > +template< typename StackAllocator, typename Fn, typename ... Args > future< typename std::result_of< - typename std::decay< Function >::type( typename std::decay< Args >::type ... ) + typename std::decay< Fn >::type( typename std::decay< Args >::type ... ) >::type > -async( std::allocator_arg_t, StackAllocator salloc, Function && fn, Args && ... args) { +async( std::allocator_arg_t, StackAllocator salloc, Fn && fn, Args && ... args) { typedef typename std::result_of< - typename std::decay< Function >::type( typename std::decay< Args >::type ... ) + typename std::decay< Fn >::type( typename std::decay< Args >::type ... ) >::type result_t; packaged_task< result_t( typename std::decay< Args >::type ... ) > pt{ - std::allocator_arg, salloc, std::forward< Function >( fn) }; + std::allocator_arg, salloc, std::forward< Fn >( fn) }; future< result_t > f{ pt.get_future() }; fiber{ std::move( pt), std::forward< Args >( args) ... }.detach(); return f;