From f644b1e475d93cee88a96727269fb0e9956df982 Mon Sep 17 00:00:00 2001 From: Vikram Rajkumar Date: Sun, 27 Jul 2014 20:46:39 -0400 Subject: [PATCH] Fix compiler warning --- include/fc/thread/task.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fc/thread/task.hpp b/include/fc/thread/task.hpp index 22e8ce5..033caec 100644 --- a/include/fc/thread/task.hpp +++ b/include/fc/thread/task.hpp @@ -61,7 +61,7 @@ namespace fc { class task : virtual public task_base, virtual public promise { public: template - task( Functor&& f, const char* desc ):task_base(&_functor), promise_base(desc), promise(desc) { + task( Functor&& f, const char* desc ):promise_base(desc), task_base(&_functor), promise(desc) { typedef typename fc::deduce::type FunctorType; static_assert( sizeof(f) <= sizeof(_functor), "sizeof(Functor) is larger than FunctorSize" ); new ((char*)&_functor) FunctorType( fc::forward(f) ); @@ -74,11 +74,12 @@ namespace fc { private: ~task(){} }; + template class task : virtual public task_base, virtual public promise { public: template - task( Functor&& f, const char* desc ):task_base(&_functor), promise_base(desc), promise(desc) { + task( Functor&& f, const char* desc ):promise_base(desc), task_base(&_functor), promise(desc) { typedef typename fc::deduce::type FunctorType; static_assert( sizeof(f) <= sizeof(_functor), "sizeof(Functor) is larger than FunctorSize" ); new ((char*)&_functor) FunctorType( fc::forward(f) ); @@ -93,4 +94,3 @@ namespace fc { }; } -