Fix for g++

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@192 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2011-01-16 09:51:51 +00:00
parent 6e8ed29462
commit 48e80258b8

View file

@ -30,19 +30,19 @@ namespace detail
BOOST_DEDUCED_TYPENAME boost::remove_const< Result >::type BOOST_DEDUCED_TYPENAME boost::remove_const< Result >::type
>::type result_type; >::type result_type;
typedef lambda< Result, Signature > lambda; typedef lambda< Result, Signature > lambda_type;
public: public:
template< typename Value > template< typename Value >
void returns( Value v ) void returns( Value v )
{ {
r_.reset( new result_type( v ) ); r_.reset( new result_type( v ) );
f_ = lambda::make_val( boost::ref( *r_ ) ); f_ = lambda_type::make_val( boost::ref( *r_ ) );
} }
template< typename Y > template< typename Y >
void returns( const boost::reference_wrapper< Y >& r ) void returns( const boost::reference_wrapper< Y >& r )
{ {
f_ = lambda::make_val( r ); f_ = lambda_type::make_val( r );
} }
void calls( const functor_type& f ) void calls( const functor_type& f )
@ -55,7 +55,7 @@ namespace detail
template< typename Exception > template< typename Exception >
void throws( Exception e ) void throws( Exception e )
{ {
f_ = lambda::make_throw( e ); f_ = lambda_type::make_throw( e );
} }
const functor_type& functor() const const functor_type& functor() const
@ -74,17 +74,17 @@ namespace detail
typedef BOOST_DEDUCED_TYPENAME typedef BOOST_DEDUCED_TYPENAME
boost::function< Signature > functor_type; boost::function< Signature > functor_type;
typedef lambda< Result*, Signature > lambda; typedef lambda< Result*, Signature > lambda_type;
public: public:
void returns( Result* r ) void returns( Result* r )
{ {
f_ = lambda::make_val( r ); f_ = lambda_type::make_val( r );
} }
template< typename Y > template< typename Y >
void returns( const boost::reference_wrapper< Y >& r ) void returns( const boost::reference_wrapper< Y >& r )
{ {
f_ = lambda::make_val( r ); f_ = lambda_type::make_val( r );
} }
void calls( const functor_type& f ) void calls( const functor_type& f )
@ -97,7 +97,7 @@ namespace detail
template< typename Exception > template< typename Exception >
void throws( Exception e ) void throws( Exception e )
{ {
f_ = lambda::make_throw( e ); f_ = lambda_type::make_throw( e );
} }
const functor_type& functor() const const functor_type& functor() const
@ -115,11 +115,11 @@ namespace detail
typedef BOOST_DEDUCED_TYPENAME typedef BOOST_DEDUCED_TYPENAME
boost::function< Signature > functor_type; boost::function< Signature > functor_type;
typedef lambda< void, Signature > lambda; typedef lambda< void, Signature > lambda_type;
public: public:
action() action()
: f_( lambda::make_nothing() ) : f_( lambda_type::make_nothing() )
{} {}
void calls( const functor_type& f ) void calls( const functor_type& f )
@ -132,7 +132,7 @@ namespace detail
template< typename Exception > template< typename Exception >
void throws( Exception e ) void throws( Exception e )
{ {
f_ = lambda::make_throw( e ); f_ = lambda_type::make_throw( e );
} }
const functor_type& functor() const const functor_type& functor() const
@ -150,7 +150,7 @@ namespace detail
typedef BOOST_DEDUCED_TYPENAME typedef BOOST_DEDUCED_TYPENAME
boost::function< Signature > functor_type; boost::function< Signature > functor_type;
typedef lambda< std::auto_ptr< Result >, Signature > lambda; typedef lambda< std::auto_ptr< Result >, Signature > lambda_type;
public: public:
action() action()
@ -159,7 +159,7 @@ namespace detail
{} {}
action( const action& rhs ) action( const action& rhs )
: r_( const_cast< action& >( rhs ).r_.release() ) : r_( const_cast< action& >( rhs ).r_.release() )
, f_( r_.get() ? lambda::make_val( boost::ref( r_ ) ) : rhs.f_ ) , f_( r_.get() ? lambda_type::make_val( boost::ref( r_ ) ) : rhs.f_ )
{} {}
template< typename Value > template< typename Value >
@ -178,7 +178,7 @@ namespace detail
template< typename Exception > template< typename Exception >
void throws( Exception e ) void throws( Exception e )
{ {
f_ = lambda::make_throw( e ); f_ = lambda_type::make_throw( e );
r_.reset(); r_.reset();
} }
@ -192,19 +192,19 @@ namespace detail
void set( std::auto_ptr< Y > r ) void set( std::auto_ptr< Y > r )
{ {
r_ = r; r_ = r;
f_ = lambda::make_val( boost::ref( r_ ) ); f_ = lambda_type::make_val( boost::ref( r_ ) );
} }
template< typename Y > template< typename Y >
void set( const boost::reference_wrapper< Y >& r ) void set( const boost::reference_wrapper< Y >& r )
{ {
f_ = lambda::make_val( r ); f_ = lambda_type::make_val( r );
r_.reset(); r_.reset();
} }
template< typename Y > template< typename Y >
void set( Y* r ) void set( Y* r )
{ {
r_.reset( r ); r_.reset( r );
f_ = lambda::make_val( boost::ref( r_ ) ); f_ = lambda_type::make_val( boost::ref( r_ ) );
} }
mutable std::auto_ptr< Result > r_; mutable std::auto_ptr< Result > r_;