| 1 | #ifndef PAR_FUN_HPP_INCLUDED
|
|---|
| 2 | #define PAR_FUN_HPP_INCLUDED
|
|---|
| 3 | #include <iostream>
|
|---|
| 4 | #include <string>
|
|---|
| 5 | #include <boost/parameter/keyword.hpp>
|
|---|
| 6 | #include <boost/parameter/name.hpp>
|
|---|
| 7 | #include <boost/parameter/parameters.hpp>
|
|---|
| 8 | #include <boost/parameter/preprocessor.hpp>
|
|---|
| 9 | #include <boost/parameter/macros.hpp>
|
|---|
| 10 |
|
|---|
| 11 | namespace lib
|
|---|
| 12 | {
|
|---|
| 13 | BOOST_PARAMETER_NAME(name)
|
|---|
| 14 | BOOST_PARAMETER_NAME(index)
|
|---|
| 15 |
|
|---|
| 16 | BOOST_PARAMETER_FUNCTION(
|
|---|
| 17 | (void), f, tag,
|
|---|
| 18 | (required (name,(std::string)))
|
|---|
| 19 | )
|
|---|
| 20 | {
|
|---|
| 21 | std::cout << name << std::endl;
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | BOOST_PARAMETER_FUNCTION(
|
|---|
| 25 | (void), f, tag,
|
|---|
| 26 | (required (index,(int)))
|
|---|
| 27 | )
|
|---|
| 28 | {
|
|---|
| 29 | std::cout << index << std::endl;
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | #endif // PAR_FUN_HPP_INCLUDED
|
|---|