From d424d4ee7f60d45c078c1a55753ae1c1e425879c Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Mon, 9 Mar 2015 08:22:10 +0100 Subject: [PATCH] Fixed support for compilers without r-value references boost::make_shared is limited to 9 arguments for such compilers. --- include/turtle/detail/expectation_template.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/turtle/detail/expectation_template.hpp b/include/turtle/detail/expectation_template.hpp index 3c5b461..a4f14a0 100644 --- a/include/turtle/detail/expectation_template.hpp +++ b/include/turtle/detail/expectation_template.hpp @@ -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