C++ Boost

const_associative_property_map<UniquePairAssociativeContainer>

This property map is an adaptor that converts any type that is a model of both Pair Associative Container and Unique Associative Container such as std::map into a constant Lvalue Property Map. Note that the adaptor only retains a reference to the container, so the lifetime of the container must encompass the use of the adaptor.

Example

Care do donate one?

Where Defined

boost/property_map.hpp

Model Of

Lvalue Property Map

Template Parameters

ParameterDescriptionDefault
UniquePairAssociativeContainer Must be a model of both Pair Associative Container and Unique Associative Container .  

Members

In addition the methods and functions required by Lvalue Property Map, this class has the following members.


property_traits<const_associative_property_map>::value_type
This is the same type as UniquePairAssociativeContainer::data_type.
const_associative_property_map()
Default Constructor.
const_associative_property_map(const UniquePairAssociativeContainer& c)
Constructor.
const data_type& operator[](const key_type& k) const
The operator bracket for property access. The key_type and data_type types are from the typedefs inside of UniquePairAssociativeContainer.

Non-Member functions


  template <typename UniquePairAssociativeContainer>
  const_associative_property_map<UniquePairAssociativeContainer>
  make_assoc_property_map(const UniquePairAssociativeContainer& c);
A function for conveniently creating an associative property map.


Copyright © 2002 Jeremy Siek, Indiana University (jsiek@osl.iu.edu)
Lie-Quan Lee, Indiana University (llee1@osl.iu.edu)
Andrew Lumsdaine, Indiana University (lums@osl.iu.edu)