Fixed mocking of a function returning a reference for gcc 4.1

This commit is contained in:
Mathieu Champlon 2017-01-15 12:46:20 +01:00
parent 39e77bb49b
commit c847c85a77
2 changed files with 8 additions and 1 deletions

View file

@ -150,7 +150,7 @@ namespace detail
return static_cast< value_imp< T >& >( *v_ ).t_;
}
template< typename T >
Result& store( T* t )
typename boost::remove_reference< Result >::type& store( T* t )
{
v_.reset( new value_imp< Result >( t ) );
return static_cast< value_imp< Result >& >( *v_ ).t_;