]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/parameter/test/macros.cpp
1 // Copyright David Abrahams, Daniel Wallin 2003.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 #include <boost/parameter.hpp>
7 #include <boost/parameter/macros.hpp>
8 #include <boost/bind/bind.hpp>
13 BOOST_PARAMETER_FUN(int, f
, 2, 4, f_parameters
)
17 , p
[test::_value
|| boost::bind(&test::value_default
)]
18 , p
[test::_index
| 999]
24 BOOST_PARAMETER_NAME(foo
)
25 BOOST_PARAMETER_NAME(bar
)
28 : boost::parameter::parameters
<
29 boost::parameter::optional
<test::tag::foo
>
30 , boost::parameter::optional
<test::tag::bar
>
35 BOOST_PARAMETER_FUN(int, baz
, 0, 2, baz_parameters
)
41 #include <boost/core/ref.hpp>
42 #include <boost/core/lightweight_test.hpp>
57 BOOST_TEST_EQ(1, test::baz());
61 test::values(std::string("foo"), 666.222, 56)
62 , test::_index
= boost::ref(x
)
63 , test::_name
= std::string("foo")
66 return boost::report_errors();