filter_graph_vp_test.cpp 842 B

123456789101112131415161718192021222324252627
  1. //=======================================================================
  2. // Copyright 2002 Indiana University.
  3. // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //=======================================================================
  9. #include <boost/graph/filtered_graph.hpp>
  10. #include <boost/graph/adjacency_list.hpp>
  11. using namespace boost;
  12. // Check to make you can apply a vertex filter with the
  13. // make_filtered_graph function, to fix bug #480175.
  14. struct NotMuchOfAFilter
  15. {
  16. template<class Vertex> bool operator()(Vertex key)
  17. const { return true; }
  18. };
  19. int main()
  20. {
  21. adjacency_list<> graph;
  22. make_filtered_graph(graph, keep_all(), NotMuchOfAFilter());
  23. }