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

@ -7,6 +7,13 @@
[section Changelog] [section Changelog]
[section unreleased]
Not yet released
* Fixed mocking of a function returning a reference for gcc 4.1
[endsect]
[section 1.3.0] [section 1.3.0]
Released 17 July 2016 Released 17 July 2016

View file

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