]> git.proxmox.com Git - ceph.git/blame - 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
CommitLineData
7c673cae
FG
1
2#include <boost/parameter.hpp>
7c673cae 3
7c673cae
FG
4BOOST_PARAMETER_NAME(index)
5
92f5a8d4
TL
6template <typename ArgumentPack>
7typename boost::parameter::value_type<ArgumentPack,tag::index,int>::type
8 twice_index(ArgumentPack const& args)
7c673cae
FG
9{
10 return 2 * args[_index|42];
11}
12
92f5a8d4
TL
13#include <boost/core/lightweight_test.hpp>
14
7c673cae
FG
15int main()
16{
92f5a8d4
TL
17 int six = twice_index(_index = 3);
18 BOOST_TEST_EQ(six, 6);
19 return boost::report_errors();
7c673cae
FG
20}
21