mirror of
https://github.com/boostorg/parameter.git
synced 2026-01-19 04:22:13 +00:00
The literate/default-expression-evaluation0 test did not actually need anything from Boost.Graph, so remove the dependency.
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
|
|
#include <boost/parameter.hpp>
|
|
#include <iostream>
|
|
|
|
BOOST_PARAMETER_NAME(graph)
|
|
BOOST_PARAMETER_NAME(visitor)
|
|
BOOST_PARAMETER_NAME(root_vertex)
|
|
BOOST_PARAMETER_NAME(index_map)
|
|
BOOST_PARAMETER_NAME(color_map)
|
|
|
|
BOOST_PARAMETER_FUNCTION((bool), depth_first_search, tag,
|
|
(required
|
|
(graph, *)
|
|
(visitor, *)
|
|
(root_vertex, *)
|
|
(index_map, *)
|
|
(color_map, *)
|
|
)
|
|
)
|
|
{
|
|
std::cout << "graph=" << graph;
|
|
std::cout << std::endl;
|
|
std::cout << "visitor=" << visitor;
|
|
std::cout << std::endl;
|
|
std::cout << "root_vertex=" << root_vertex;
|
|
std::cout << std::endl;
|
|
std::cout << "index_map=" << index_map;
|
|
std::cout << std::endl;
|
|
std::cout << "color_map=" << color_map;
|
|
std::cout << std::endl;
|
|
return true;
|
|
}
|
|
|
|
#include <boost/core/lightweight_test.hpp>
|
|
|
|
int main()
|
|
{
|
|
char const* g = "1";
|
|
depth_first_search(1, 2, 3, 4, 5);
|
|
depth_first_search(
|
|
g, '2', _color_map = '5'
|
|
, _index_map = "4", _root_vertex = "3"
|
|
);
|
|
return boost::report_errors();
|
|
}
|
|
|