Fixed support for compilers without r-value references

boost::make_shared is limited to 9 arguments for such compilers.
This commit is contained in:
Mathieu Champlon 2015-03-09 08:22:10 +01:00
parent 997b9b7f67
commit d424d4ee7f

View file

@ -165,22 +165,22 @@ namespace detail
expectation& with(
BOOST_PP_ENUM_BINARY_PARAMS(MOCK_NUM_ARGS, Constraint_, c) )
{
matcher_ =
boost::make_shared< single_matcher<
matcher_.reset(
new single_matcher<
void( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, Constraint_) ),
void( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) )
> >(
BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, c) );
>( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, c) ) );
return *this;
}
#if MOCK_NUM_ARGS > 1
template< typename Constraint >
expectation& with( const Constraint& c )
{
matcher_ =
boost::make_shared< multi_matcher<
matcher_.reset(
new multi_matcher<
Constraint,
void( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) > >( c );
void( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) )
>( c ) );
return *this;
}
#endif