
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