1 //=======================================================================
2 // Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //=======================================================================
9 #include <boost/config.hpp>
12 #include <boost/graph/adjacency_list.hpp>
13 #include <boost/graph/property_iter_range.hpp>
18 using namespace boost
;
19 typedef adjacency_list
< listS
, vecS
, directedS
,
20 property
< vertex_name_t
, std::string
> >graph_t
;
23 const char *vertex_names
[] = { "Kubrick", "Clark", "Hal" };
25 graph_property_iter_range
< graph_t
, vertex_name_t
>::iterator v
, v_end
;
26 for (boost::tie(v
, v_end
) = get_property_iter_range(g
, vertex_name
);
30 boost::tie(v
, v_end
) = get_property_iter_range(g
, vertex_name
);
31 std::copy(v
, v_end
, std::ostream_iterator
< std::string
> (std::cout
, " "));
32 std::cout
<< std::endl
;