]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/parameter/test/literate/namespaces2.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / parameter / test / literate / namespaces2.cpp
CommitLineData
7c673cae
FG
1
2#include <boost/parameter.hpp>
3#include <iostream>
92f5a8d4
TL
4
5namespace lib {
6
7 BOOST_PARAMETER_NAME(name)
8 BOOST_PARAMETER_NAME(index)
9
10 BOOST_PARAMETER_FUNCTION(
11 (int), f, tag, (optional (name,*,"bob")(index,(int),1))
12 )
13 {
14 std::cout << name << ":" << index << std::endl;
15 return index;
16 }
7c673cae 17}
92f5a8d4
TL
18
19#include <boost/core/lightweight_test.hpp>
20
7c673cae 21using namespace lib;
92f5a8d4
TL
22
23int main()
24{
25 int x = f(_name = "jill", _index = 3);
26 BOOST_TEST_EQ(x, 3);
27 return boost::report_errors();
28}
7c673cae 29