diff --git a/test/mem_fn_dm_test.cpp b/test/mem_fn_dm_test.cpp index c2298e7..18a6234 100644 --- a/test/mem_fn_dm_test.cpp +++ b/test/mem_fn_dm_test.cpp @@ -18,6 +18,7 @@ // #include +#include #include #include @@ -59,5 +60,14 @@ int main() // boost::mem_fn( &X::m )( boost::ref( x ) ) = 704; // BOOST_TEST_EQ( x.m, 704 ); + boost::shared_ptr sp( new X() ); + boost::shared_ptr csp( sp ); + + BOOST_TEST_EQ( boost::mem_fn( &X::m )( sp ), 0 ); + BOOST_TEST_EQ( boost::mem_fn( &X::m )( csp ), 0 ); + + // boost::mem_fn( &X::m )( sp ) = 805; + // BOOST_TEST_EQ( x.m, 805 ); + return boost::report_errors(); }