diff --git a/test/bfs.cpp b/test/bfs.cpp index 21b1b169..e6e33bcd 100644 --- a/test/bfs.cpp +++ b/test/bfs.cpp @@ -150,9 +150,11 @@ struct bfs_test // Create the testing visitor. bfs_testing_visitor - visitor(start, &distance[0], &parent[0], &color[0]); + vis(start, &distance[0], &parent[0], &color[0]); - boost::breadth_first_search(g, start, visitor, &color[0]); + boost::breadth_first_search(g, start, + visitor(vis). + color_map(&color[0])); // All white vertices should be unreachable from the source. for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) @@ -178,36 +180,6 @@ int test_main(int argc, char* argv[]) if (argc > 1) max_V = atoi(argv[1]); - if (0) { // compile only - // Check boost::breadth_first_search() version 1 requirements. - typedef boost::default_constructible_archetype< - boost::sgi_assignable_archetype< - boost::equality_comparable_archetype<> > > Vertex; - typedef boost::vertex_list_graph_archetype VLGraph; - typedef boost::property_graph_archetype PGraph; - PGraph g_arch1; - boost::breadth_first_search(g_arch1, Vertex(), boost::bfs_visitor<>()); - - // Check boost::breadth_first_search() version 2 requirements. - VLGraph g_arch2; - typedef boost::read_write_property_map_archetype color_map; - boost::breadth_first_search(g_arch2, Vertex(), boost::bfs_visitor<>(), - color_map()); - - // Check boost::breadth_first_search() version 3 requirements. - typedef boost::incidence_graph_archetype IncGraph; - IncGraph g_arch3; - buffer_archetype buffer; - boost::breadth_first_search(g_arch3, Vertex(), buffer, - boost::bfs_visitor<>(), color_map()); - - } - - bfs_test< adjacency_list >::go(max_V); bfs_test< adjacency_list >::go(max_V); return 0;