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,
> <>, 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:

Please let me know if the commits might cause any troubles. I'll keep a
look at the regression page,

Kind regards, Niels

Niels Dekker
Scientific programmer at LKEB, Leiden University Medical Center

Boost list run by bdawes at, gregod at, cpdaniel at, john at