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
10#include <boost/graph/filtered_graph.hpp>
11#include <boost/graph/adjacency_list.hpp>
12using namespace boost;
13
14// Check to make you can apply a vertex filter with the
15// make_filtered_graph function, to fix bug #480175.
16
17struct NotMuchOfAFilter
18{
19 template < class Vertex > bool operator()(Vertex key) const { return true; }
20};
21
22int main()
23{
24 adjacency_list<> graph;
25 make_filtered_graph(g&: graph, ep: keep_all(), vp: NotMuchOfAFilter());
26}
27

source code of boost/libs/graph/test/filter_graph_vp_test.cpp