Boost logo

Boost :

Subject: Re: [boost] [utility] A fix for the const issue of value_initialized
From: Niels Dekker - mail address until 2010-10-10 (niels_address_until_2010-10-10_at_[hidden])
Date: 2009-02-20 15:39:38


> The boost::value_initialized<T> utility has a major issue regarding
> const-correctness: It has a const-qualified conversion operator,
> returning a non-const reference to the T object it owns. I have
> already created a ticket,
> <https://svn.boost.org/trac/boost/ticket/2548>, and
> mailed Fernando Cacciola (the author of value_initialized) on this
> issue. He agrees that it should be fixed, and he allows me to do so.
> The patch I've attached to the ticked replaces the current conversion
> operator by two of them, overloaded for const and non-const access

Just committed to the trunk:

https://svn.boost.org/trac/boost/changeset/51355
https://svn.boost.org/trac/boost/changeset/51356

Please let me know if the commits might cause any troubles. I'll keep a
look at the regression page,
http://www.boost.org/development/tests/trunk/developer/utility_.html

Kind regards, Niels

--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk