Index: property_map.hpp =================================================================== --- property_map.hpp (revision 58237) +++ property_map.hpp (working copy) @@ -302,7 +302,8 @@ } }; - struct identity_property_map; + template + struct typed_identity_property_map; // A helper class for constructing a property map // from a class that implements operator[] @@ -539,19 +540,23 @@ }; //========================================================================= - // A property map that applies the identity function to integers - struct identity_property_map - : public boost::put_get_helper + // A generalized identity property map + template + struct typed_identity_property_map + : public boost::put_get_helper > { - typedef std::size_t key_type; - typedef std::size_t value_type; - typedef std::size_t reference; + typedef T key_type; + typedef T value_type; + typedef T reference; typedef boost::readable_property_map_tag category; inline value_type operator[](const key_type& v) const { return v; } }; +//========================================================================= + // A property map that applies the identity function to integers + typedef typed_identity_property_map identity_property_map; + //========================================================================= // A property map that does not do anything, for // when you have to supply a property map, but don't need it.