]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/bind/test/mem_fn_dm_test.cpp
1 #include <boost/config.hpp>
3 #if defined(BOOST_MSVC)
4 #pragma warning(disable: 4786) // identifier truncated in debug info
5 #pragma warning(disable: 4710) // function not inlined
6 #pragma warning(disable: 4711) // function selected for automatic inline expansion
7 #pragma warning(disable: 4514) // unreferenced inline removed
11 // mem_fn_dm_test.cpp - data members
13 // Copyright (c) 2005 Peter Dimov
15 // Distributed under the Boost Software License, Version 1.0. (See
16 // accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
20 #include <boost/mem_fn.hpp>
22 #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
23 #pragma warning(push, 3)
28 #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
32 #include <boost/detail/lightweight_test.hpp>
43 boost::mem_fn( &X::m
)( x
) = 401;
45 BOOST_TEST( x
.m
== 401 );
46 BOOST_TEST( boost::mem_fn( &X::m
)( x
) == 401 );
48 boost::mem_fn( &X::m
)( &x
) = 502;
50 BOOST_TEST( x
.m
== 502 );
51 BOOST_TEST( boost::mem_fn( &X::m
)( &x
) == 502 );
55 boost::mem_fn( &X::m
)( px
) = 603;
57 BOOST_TEST( x
.m
== 603 );
58 BOOST_TEST( boost::mem_fn( &X::m
)( px
) == 603 );
63 BOOST_TEST( boost::mem_fn( &X::m
)( cx
) == 603 );
64 BOOST_TEST( boost::mem_fn( &X::m
)( pcx
) == 603 );
66 return boost::report_errors();