Use std::reference_wrapper instead of boost

This commit is contained in:
Alexander Grund 2020-07-09 20:25:40 +02:00
parent 353849e9ad
commit 35e43d58a6
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
16 changed files with 116 additions and 90 deletions

View file

@ -740,7 +740,7 @@ BOOST_AUTO_TEST_CASE( demonstrates_configuring_actions_with_references )
{
mock_class c;
int i = 0;
MOCK_EXPECT( c.method ).returns( boost::ref( i ) ); // wrap i to store a reference
MOCK_EXPECT( c.method ).returns( std::ref( i ) ); // wrap i to store a reference
c.method() = 42; // really change i and not just the stored copy
BOOST_CHECK_EQUAL( 42, i ); // indeed
}