]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/test/boost_bind_compatibility/bind_ref_test.cpp
1 /*==============================================================================
2 Copyright (c) 2009 Peter Dimov
3 Copyright (c) 2005-2010 Joel de Guzman
4 Copyright (c) 2010 Thomas Heller
6 Distributed under the Boost Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 ==============================================================================*/
10 #include <boost/phoenix/core.hpp>
11 #include <boost/phoenix/bind.hpp>
12 #include <boost/ref.hpp>
13 #include <boost/detail/lightweight_test.hpp>
30 using boost::phoenix::bind
;
31 using boost::phoenix::placeholders::_1
;
34 BOOST_TEST( bind( &X::f
, _1
, 1 )( boost::ref( x
) ) == 1 );
35 BOOST_TEST( bind( &X::g
, _1
, 2 )( boost::cref( x
) ) == -2 );
37 return boost::report_errors();