Subject: [Boost-bugs] [Boost C++ Libraries] #6543: identity_property_map is not overloaded for any key type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-02-10 14:31:47
#6543: identity_property_map is not overloaded for any key type
-------------------------------------------------+--------------------------
Reporter: Alex Hagen-Zanker <ahh34@â¦> | Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.48.0
Severity: Problem | Keywords:
-------------------------------------------------+--------------------------
The following assertion fails, because a is first cast to size_t and then
to double. Leaving us with a = 0.5 and b = 0.0
boost::identity_property_map identity;
double a = 0.5;
double b = get(identity, a);
assert(a==b);
I am submitting a patch that introduces (reinstates?) the overloads that
are promised in the documentation.
The patch contains an additional property map: identity_ref_property_map,
which is a identity_property_map that returns a reference to the key,
instead of a copy of the key.
Including that struct is up to your discretion, it is not really part of
the patch.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6543> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC