Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/graph/example/iterator-property-map-eg.cpp @ 30

Last change on this file since 30 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 727 bytes
Line 
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.hpp>
10
11int
12main()
13{
14  using namespace boost;
15  double x[] = { 0.2, 4.5, 3.2 };
16  iterator_property_map < double *, identity_property_map, double, double& > pmap(x);
17  std::cout << "x[1] = " << get(pmap, 1) << std::endl;
18  put(pmap, 0, 1.7);
19  std::cout << "x[0] = " << pmap[0] << std::endl;
20  return 0;
21}
Note: See TracBrowser for help on using the repository browser.