C++ Boost

typed_identity_property_map< T >

typedef typed_identity_propoperty_map<size_t> identity_property_map

The typed_identity_property_map applies the identity function, that is, it just returns a copy of the key object that was input. The type key and value objects have the same type which is set by the template parameter T. The identity_property_map is for the common case where the key and value type is size_t.

Note: Previously the function get() and operator[] for identity_property_map were overloaded to return a copy of keys of any type, i.e. not just size_t. These overloads are now deprecated, because they did not adhere to the property map concepts.

Where Defined

boost/property_map/property_map.hpp

Model of

Readable Property Map

Template Parameters

Parameter Description Default
T Must be Copy Contructible  

Associated Types

TypeDescription
boost::property_traits<typed_identity_property_map<T> >::value_type This type is T.
boost::property_traits<typed_identity_property_map<T> >::key_type This type is T.
boost::property_traits<typed_identity_property_map<T> >::reference This type is T..
boost::property_traits<typed_identity_property_map<T> >::category This type is boost::readable_property_map_tag.

Member Functions

MemberDescription
typed_identity_property_map() Default constructor.
typed_identity_property_map(const typed_identity_property_map<T>& x) Copy constructor.
T operator[](const T& x) const Returns a copy of object x.

Non-Member Functions

MemberDescription
T get(const typed_identity_property_map<T>& pmap, const T& x) Returns a copy of object x.


Copyright © 2000-2012 Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu)
Lie-Quan Lee, Univ.of Notre Dame (llee1@lsc.nd.edu)
Andrew Lumsdaine, Univ.of Notre Dame (lums@lsc.nd.edu)
Alex Hagen-Zanker