]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/graph/example/property-map-traits-eg.cpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / libs / graph / example / property-map-traits-eg.cpp
CommitLineData
7c673cae 1//=======================================================================
f67539c2 2// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
7c673cae
FG
3//
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//=======================================================================
8#include <boost/config.hpp>
9#include <iostream>
10#include <string>
11#include <boost/graph/adjacency_list.hpp>
f67539c2 12int main()
7c673cae 13{
f67539c2
TL
14 using namespace boost;
15 typedef adjacency_list< listS, listS, directedS,
16 property< vertex_name_t, std::string > >
17 graph_t;
18 graph_t g;
19 graph_traits< graph_t >::vertex_descriptor u = add_vertex(g);
20 property_map< graph_t, vertex_name_t >::type name_map = get(vertex_name, g);
21 name_map[u] = "Joe";
22 std::cout << name_map[u] << std::endl;
23 return EXIT_SUCCESS;
7c673cae 24}