Passing boost::reference_wrapper by value instead of const&

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@455 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-05-26 10:05:17 +00:00
parent cc9589f457
commit 05978fc7d3
2 changed files with 4 additions and 5 deletions

View file

@ -44,7 +44,7 @@ namespace detail
f_ = lambda_type::make_val( boost::ref( *r_ ) );
}
template< typename Y >
void returns( const boost::reference_wrapper< Y >& r )
void returns( boost::reference_wrapper< Y > r )
{
f_ = lambda_type::make_val( r );
}
@ -86,7 +86,7 @@ namespace detail
f_ = lambda_type::make_val( r );
}
template< typename Y >
void returns( const boost::reference_wrapper< Y >& r )
void returns( boost::reference_wrapper< Y > r )
{
f_ = lambda_type::make_val( r );
}
@ -201,7 +201,7 @@ namespace detail
f_ = lambda_type::make_val( boost::ref( r_ ) );
}
template< typename Y >
void set( const boost::reference_wrapper< Y >& r )
void set( boost::reference_wrapper< Y > r )
{
f_ = lambda_type::make_val( r );
r_.reset();

View file

@ -264,8 +264,7 @@ namespace detail
return s;
}
template< typename T >
stream& operator<<( stream& s,
const boost::reference_wrapper< T >& t )
stream& operator<<( stream& s, boost::reference_wrapper< T > t )
{
return s << mock::format( t.get() );
}