mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Fix for g++
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@189 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
bd648e0579
commit
28761038cc
1 changed files with 13 additions and 25 deletions
|
|
@ -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_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue