]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/test/bind/bind_function_tests.cpp
1 /*=============================================================================
2 Copyright (c) 2001-2007 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
9 #include <boost/detail/lightweight_test.hpp>
10 #include <boost/phoenix/core.hpp>
11 #include <boost/phoenix/bind.hpp>
18 std::cout
<< "Test binding functions...\n";
34 plus4(int a
, int b
, int c
, int d
)
43 using boost::phoenix::bind
;
44 using boost::phoenix::arg_names::arg1
;
45 using boost::phoenix::arg_names::arg2
;
51 BOOST_TEST(bind(test::negate
, arg1
)(a
) == -a
);
52 BOOST_TEST(bind(test::plus
, arg1
, arg2
)(a
, b
) == a
+b
);
53 BOOST_TEST(bind(test::plus4
, arg1
, arg2
, 3, 4)(a
, b
) == a
+b
+3+4);
55 return boost::report_errors();