From caef00d2e315cda0697ebf79c4bade888aa9b17d Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Thu, 29 Mar 2018 15:10:42 +0200 Subject: [PATCH] Fixed move in actions for gcc --- include/turtle/detail/action.hpp | 8 +++++++- include/turtle/detail/function_impl_template.hpp | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/turtle/detail/action.hpp b/include/turtle/detail/action.hpp index 8c49633..ed055d2 100644 --- a/include/turtle/detail/action.hpp +++ b/include/turtle/detail/action.hpp @@ -109,11 +109,17 @@ namespace detail { this->set( boost::bind( - &boost::move< BOOST_RV_REF(Value) >, + &move< Value >, boost::ref( store( boost::move( v ) ) ) ) ); } private: + template< typename T > + static T&& move( T& t ) + { + return std::move( t ); + } + struct value : boost::noncopyable { virtual ~value() diff --git a/include/turtle/detail/function_impl_template.hpp b/include/turtle/detail/function_impl_template.hpp index 4e322db..4d47a82 100644 --- a/include/turtle/detail/function_impl_template.hpp +++ b/include/turtle/detail/function_impl_template.hpp @@ -183,9 +183,9 @@ namespace detail this->e_->throws( t ); } template< typename TT > - void moves( TT t ) + void moves( BOOST_RV_REF(TT) t ) { - this->e_->moves( t ); + this->e_->moves( boost::move( t ) ); } lock lock_;