]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/parameter/test/deduced.cpp
1 // Copyright Daniel Wallin 2006. 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/parameters.hpp>
6 #include <boost/parameter/name.hpp>
7 #include <boost/parameter/binding.hpp>
10 namespace parameter
= boost::parameter
;
11 namespace mpl
= boost::mpl
;
13 BOOST_PARAMETER_NAME(x
)
14 BOOST_PARAMETER_NAME(y
)
15 BOOST_PARAMETER_NAME(z
)
19 using namespace parameter
;
35 , required
<deduced
<tag::y
>, boost::is_convertible
<mpl::_
, int> >
36 , optional
<deduced
<tag::z
>, boost::is_convertible
<mpl::_
, char const*> >
39 (_x
= 0, _y
= not_present
, _z
= "foo")
47 , required
<deduced
<tag::y
>, boost::is_convertible
<mpl::_
, int> >
48 , optional
<deduced
<tag::z
>, boost::is_convertible
<mpl::_
, char const*> >
51 (_x
= 0, _y
= 1, _z
= "foo")
60 , required
<deduced
<tag::y
>, boost::is_convertible
<mpl::_
, int> >
61 , optional
<deduced
<tag::z
>, boost::is_convertible
<mpl::_
, char const*> >
64 (_x
= 0, _y
= 1, _z
= "foo")
73 , required
<deduced
<tag::y
>, boost::is_convertible
<mpl::_
, int> >
74 , optional
<deduced
<tag::z
>, boost::is_convertible
<mpl::_
, char const*> >
77 (_x
= 0, _y
= 1, _z
= "foo")
86 , required
<deduced
<tag::y
>, boost::is_convertible
<mpl::_
, int> >
87 , optional
<deduced
<tag::z
>, boost::is_convertible
<mpl::_
, char const*> >
90 (_x
= 0, _y
= 1, _z
= "foo")
96 // Fails becasue of parameters.hpp:428
101 , required<deduced<tag::y>, boost::is_convertible<mpl::_, int> >
102 , optional<deduced<tag::z>, boost::is_convertible<mpl::_, char const*> >
105 (_x = 0, _y = 1, _z = "foo")