diff --git a/test/mem_fn_dm_test.cpp b/test/mem_fn_dm_test.cpp index 18a6234b..e14e734f 100644 --- a/test/mem_fn_dm_test.cpp +++ b/test/mem_fn_dm_test.cpp @@ -21,6 +21,7 @@ #include #include #include +#include struct X { @@ -57,17 +58,27 @@ int main() BOOST_TEST_EQ( boost::mem_fn( &X::m )( boost::ref( x ) ), 603 ); BOOST_TEST_EQ( boost::mem_fn( &X::m )( boost::cref( x ) ), 603 ); - // boost::mem_fn( &X::m )( boost::ref( x ) ) = 704; - // BOOST_TEST_EQ( x.m, 704 ); +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900) + + boost::mem_fn( &X::m )( boost::ref( x ) ) = 704; + BOOST_TEST_EQ( x.m, 704 ); + +#endif 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 ); + sp->m = 805; + + BOOST_TEST_EQ( boost::mem_fn( &X::m )( sp ), 805 ); + BOOST_TEST_EQ( boost::mem_fn( &X::m )( csp ), 805 ); - // boost::mem_fn( &X::m )( sp ) = 805; - // BOOST_TEST_EQ( x.m, 805 ); +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900) + + boost::mem_fn( &X::m )( sp ) = 906; + BOOST_TEST_EQ( sp->m, 906 ); + +#endif return boost::report_errors(); }