You can use #include <boost/graph/graph_utility.hpp>
where plenty of iterator macros are defined: BGL_FORALL_EDGES, BGL_FORALL_VERTICES, BGL_FORALL_OUTEDGES, etc.
Your typical code could look like:
BGL_FORALL_VERTICES(src, g, MyGraph_t )
{
BGL_FORALL_OUTEDGES(src, ed, g, MyGraph_t )
{
MyGraph_t::vertex_descriptor tgt = target(ed, g);
... do something ...
}
}
This code will work regardless whether MyGraph_t is a filtered_graph or adjacency_list or any other BGL graph type.