From 2003e43d871ec3f3ca996e6dad18a9a7b36337dc Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Mon, 13 Jul 2015 19:56:05 +0200 Subject: [PATCH] fix calling fn in future --- include/boost/fiber/future/detail/task_object.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/fiber/future/detail/task_object.hpp b/include/boost/fiber/future/detail/task_object.hpp index 52c8c7a4..2629f19e 100644 --- a/include/boost/fiber/future/detail/task_object.hpp +++ b/include/boost/fiber/future/detail/task_object.hpp @@ -13,6 +13,7 @@ #include #include +#include #include #ifdef BOOST_HAS_ABI_HEADERS @@ -38,7 +39,7 @@ public: void run( Args && ... args) { try { - this->set_value( fn_( std::forward< Args >( args) ... ) ); + this->set_value( invoke( fn_, std::forward< Args >( args) ... ) ); } catch (...) { this->set_exception( std::current_exception() ); } @@ -74,7 +75,7 @@ public: void run( Args && ... args) { try { - fn_( std::forward< Args >( args) ... ); + invoke( fn_, std::forward< Args >( args) ... ); this->set_value(); } catch (...) { this->set_exception( std::current_exception() );