Fix C++98 compatibility

This commit is contained in:
Alexander Grund 2018-11-19 11:25:09 +01:00
parent 2cde572532
commit f402c6161e
13 changed files with 146 additions and 37 deletions

View file

@ -8,8 +8,8 @@
#include "function_impl_template.hpp"
#define MOCK_FORWARD(z, n, d) \
boost::forward< T##n >( t##n )
#define MOCK_MOVE(z, n, d) \
mock::detail::move_if_not_lvalue_reference< T##n >( t##n )
namespace mock
{
@ -74,7 +74,7 @@ namespace detail
R operator()(
BOOST_PP_ENUM_BINARY_PARAMS(MOCK_NUM_ARGS, T, t) ) const
{
return (*impl_)( BOOST_PP_ENUM(MOCK_NUM_ARGS, MOCK_FORWARD, _) );
return (*impl_)( BOOST_PP_ENUM(MOCK_NUM_ARGS, MOCK_MOVE, _) );
}
friend std::ostream& operator<<( std::ostream& s, const function& f )
@ -102,3 +102,5 @@ namespace detail
};
}
} // mock
#undef MOCK_MOVE