#include <iostream>
#include <boost/bind/bind.hpp>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/test/unit_test.hpp>
◆ BOOST_AUTO_TEST_CASE() [1/2]
| BOOST_AUTO_TEST_CASE |
( |
keeps_object_alive_while_getting |
| ) |
|
60 const int expected = value;
62 boost::function<int()>
const f = boost::bind(&
A::get, a);
◆ BOOST_AUTO_TEST_CASE() [2/2]
| BOOST_AUTO_TEST_CASE |
( |
keeps_object_alive_while_setting |
| ) |
|
48 const int expected = 1;
50 boost::function<void()>
const f = boost::bind(&
A::set, a, expected);