diff --git a/test/test_log.cpp b/test/test_log.cpp index 9b6f6df..0502991 100644 --- a/test/test_log.cpp +++ b/test/test_log.cpp @@ -523,7 +523,8 @@ BOOST_AUTO_TEST_CASE( boost_assign_map_list_of_are_serialized ) BOOST_AUTO_TEST_CASE( boost_reference_wrappers_are_serialized ) { - BOOST_CHECK_EQUAL( "3", to_string( boost::cref( 3 ) ) ); + const int i = 3; + BOOST_CHECK_EQUAL( "3", to_string( boost::cref( i ) ) ); BOOST_CHECK_EQUAL( "\"string\"", to_string( boost::cref( "string" ) ) ); } diff --git a/test/test_matcher.cpp b/test/test_matcher.cpp index 607e60b..c17a0e0 100644 --- a/test/test_matcher.cpp +++ b/test/test_matcher.cpp @@ -27,8 +27,9 @@ BOOST_AUTO_TEST_CASE( int_and_int_can_be_compared ) BOOST_AUTO_TEST_CASE( ref_to_int_and_int_can_be_compared ) { - BOOST_CHECK( match( 3, boost::cref( 3 ) ) ); - BOOST_CHECK( ! match( 4, boost::cref( 3 ) ) ); + const int i = 3; + BOOST_CHECK( match( 3, boost::cref( i ) ) ); + BOOST_CHECK( ! match( 4, boost::cref( i ) ) ); } namespace