1//=======================================================================
2// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
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 <iostream>
9#include <boost/property_map/property_map.hpp>
10
11int main()
12{
13 using namespace boost;
14 double x[] = { 0.2, 4.5, 3.2 };
15 iterator_property_map< double*, identity_property_map, double, double& >
16 pmap(x);
17 std::cout << "x[1] = " << get(pa: pmap, k: 1) << std::endl;
18 put(pa: pmap, k: 0, v: 1.7);
19 std::cout << "x[0] = " << pmap[0] << std::endl;
20 return 0;
21}
22

source code of boost/libs/graph/example/iterator-property-map-eg.cpp