summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/parameter/test/literate/optional-parameters0.cpp
blob: fb6bc93968ff42ff6ffccd903822e45bd1af47e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <boost/parameter.hpp>

namespace boost {

    int vertex_index = 0;

    template <typename T = int>
    struct dfs_visitor
    {
    };
}

BOOST_PARAMETER_NAME(graph)
BOOST_PARAMETER_NAME(visitor)
BOOST_PARAMETER_NAME(root_vertex)
BOOST_PARAMETER_NAME(index_map)
BOOST_PARAMETER_NAME(in_out(color_map))

BOOST_PARAMETER_FUNCTION((void), f, tag,
    (required (graph, *))
    (optional
        (visitor,     *, boost::dfs_visitor<>())
        (root_vertex, *, *vertices(graph).first)
        (index_map,   *, get(boost::vertex_index,graph))
        (color_map,   *,
            default_color_map(num_vertices(graph), index_map)
        )
    )
)
{
}