]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/bind/test/bind_dm2_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 // bind_dm2_test.cpp - data members, advanced uses
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/bind.hpp>
22 #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
23 #pragma warning(push, 3)
29 #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
33 #include <boost/detail/lightweight_test.hpp>
50 boost::bind
< int& >( &X::m
, _1
)( px
) = 42;
52 BOOST_TEST( x
.m
== 42 );
54 boost::bind
< int& >( &X::m
, boost::ref(x
) )() = 17041;
56 BOOST_TEST( x
.m
== 17041 );
60 BOOST_TEST( boost::bind
< long >( &X::m
, _1
)( pcx
) == 17041L );
61 BOOST_TEST( boost::bind
< long >( &X::m
, pcx
)() == 17041L );
64 std::string
v( "test" );
66 BOOST_TEST( boost::bind
< char const* >( &Y::m
, &y
)() == v
);
67 BOOST_TEST( boost::bind
< std::string
>( &Y::m
, &y
)() == v
);
69 return boost::report_errors();