Ticket #9493: test.cpp

File test.cpp, 508 bytes (added by Adam Romanek <romanek.adam@…>, 9 years ago)
Line 
1#include <string>
2#include <boost/graph/adjacency_list.hpp>
3#include <boost/graph/labeled_graph.hpp>
4
5namespace b = boost;
6
7struct vertex_data {
8 std::string name;
9};
10
11typedef b::adjacency_list<b::vecS, b::listS, b::directedS, vertex_data> test_adjacency_list;
12typedef b::labeled_graph<test_adjacency_list, std::string> graph;
13typedef graph::vertex_descriptor vertex;
14
15int main() {
16 graph g;
17 g.add_vertex("foo");
18 g.remove_vertex("foo");
19 vertex v = g.add_vertex("foo");
20 g.graph()[v].name = "bar";
21}