]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/parameter/test/singular.cpp
1 // Copyright Daniel Wallin 2005. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 #include <boost/parameter/keyword.hpp>
6 #include <boost/detail/lightweight_test.hpp>
8 BOOST_PARAMETER_KEYWORD(tag
, x
)
9 BOOST_PARAMETER_KEYWORD(tag
, y
)
13 typedef int result_type
;
15 int operator()() const
21 template <class ArgumentPack
, class K
, class T
>
22 void check(ArgumentPack
const& p
, K
const& kw
, T
const& value
)
24 BOOST_TEST(p
[kw
] == value
);
32 check(x
= 20, x
| 0, 20);
33 check(y
= 20, y
| 0, 20);
35 check(x
= 20, x
| default_src(), 20);
36 check(y
= 20, y
| default_src(), 20);
38 check(y
= 20, x
| 0, 0);
39 check(y
= 20, x
|| default_src(), 0);
40 return boost::report_errors();