diff --git a/src/libraries/turtle/action.hpp b/src/libraries/turtle/action.hpp index 9f05608..3f019b7 100644 --- a/src/libraries/turtle/action.hpp +++ b/src/libraries/turtle/action.hpp @@ -30,20 +30,17 @@ namespace detail BOOST_DEDUCED_TYPENAME boost::remove_const< Result >::type >::type result_type; - typedef BOOST_DEDUCED_TYPENAME - lambda< Signature > lambda; - public: template< typename Value > void returns( Value v ) { r_.reset( new result_type( v ) ); - f_ = lambda::make_val( boost::ref( *r_ ) ); + f_ = lambda< Signature >::make_val( boost::ref( *r_ ) ); } template< typename Y > void returns( const boost::reference_wrapper< Y >& r ) { - f_ = lambda::make_val( r ); + f_ = lambda< Signature >::make_val( r ); } void calls( const functor_type& f ) @@ -56,7 +53,7 @@ namespace detail template< typename Exception > void throws( Exception e ) { - f_ = lambda::make_throw( e ); + f_ = lambda< Signature >::make_throw( e ); } const functor_type& functor() const @@ -75,18 +72,15 @@ namespace detail typedef BOOST_DEDUCED_TYPENAME boost::function< Signature > functor_type; - typedef BOOST_DEDUCED_TYPENAME - lambda< Signature > lambda; - public: void returns( Result* r ) { - f_ = lambda::make_val( r ); + f_ = lambda< Signature >::make_val( r ); } template< typename Y > void returns( const boost::reference_wrapper< Y >& r ) { - f_ = lambda::make_val( r ); + f_ = lambda< Signature >::make_val( r ); } void calls( const functor_type& f ) @@ -99,7 +93,7 @@ namespace detail template< typename Exception > void throws( Exception e ) { - f_ = lambda::make_throw( e ); + f_ = lambda< Signature >::make_throw( e ); } const functor_type& functor() const @@ -117,12 +111,9 @@ namespace detail typedef BOOST_DEDUCED_TYPENAME boost::function< Signature > functor_type; - typedef BOOST_DEDUCED_TYPENAME - lambda< Signature > lambda; - public: action() - : f_( lambda::make_nothing() ) + : f_( lambda< Signature >::make_nothing() ) {} void calls( const functor_type& f ) @@ -135,7 +126,7 @@ namespace detail template< typename Exception > void throws( Exception e ) { - f_ = lambda::make_throw( e ); + f_ = lambda< Signature >::make_throw( e ); } const functor_type& functor() const @@ -153,9 +144,6 @@ namespace detail typedef BOOST_DEDUCED_TYPENAME boost::function< Signature > functor_type; - typedef BOOST_DEDUCED_TYPENAME - lambda< Signature > lambda; - public: action() : r_() @@ -163,7 +151,7 @@ namespace detail {} action( const action& rhs ) : r_( const_cast< action& >( rhs ).r_.release() ) - , f_( r_.get() ? lambda::make_val( boost::ref( r_ ) ) : rhs.f_ ) + , f_( r_.get() ? lambda< Signature >::make_val( boost::ref( r_ ) ) : rhs.f_ ) {} template< typename Value > @@ -182,7 +170,7 @@ namespace detail template< typename Exception > void throws( Exception e ) { - f_ = lambda::make_throw( e ); + f_ = lambda< Signature >::make_throw( e ); r_.reset(); } @@ -196,19 +184,19 @@ namespace detail void set( std::auto_ptr< Y > r ) { r_ = r; - f_ = lambda::make_val( boost::ref( r_ ) ); + f_ = lambda< Signature >::make_val( boost::ref( r_ ) ); } template< typename Y > void set( const boost::reference_wrapper< Y >& r ) { - f_ = lambda::make_val( r ); + f_ = lambda< Signature >::make_val( r ); r_.reset(); } template< typename Y > void set( Y* r ) { r_.reset( r ); - f_ = lambda::make_val( boost::ref( r_ ) ); + f_ = lambda< Signature >::make_val( boost::ref( r_ ) ); } mutable std::auto_ptr< Result > r_;