]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/parameter/test/literate/extracting-parameter-types1.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / parameter / test / literate / extracting-parameter-types1.cpp
1
2 #include <boost/parameter.hpp>
3
4 BOOST_PARAMETER_NAME(index)
5
6 template <typename ArgumentPack>
7 typename boost::parameter::value_type<ArgumentPack,tag::index,int>::type
8 twice_index(ArgumentPack const& args)
9 {
10 return 2 * args[_index|42];
11 }
12
13 #include <boost/core/lightweight_test.hpp>
14
15 int main()
16 {
17 int six = twice_index(_index = 3);
18 BOOST_TEST_EQ(six, 6);
19 return boost::report_errors();
20 }
21