Boost logo

Boost :

Subject: Re: [boost] boost::mpl::for_each and value_initialized
From: David Abrahams (dave_at_[hidden])
Date: 2009-09-24 09:56:39

on Fri Sep 04 2009, "Aleksey Gurtovoy" <> wrote:

> Hi Peter,
>> what is the use of value_initialized in boost::mpl::for_each?
>> It should be sufficient if the value is initialized by the constructor.
> In theory, yes. In practice, at the time when the code was authored,
> it wasn't -- see
>> value_initialized() calls memset() in before calling the constructor.
> Apparently this change was introduced in 1.35 release:
> "New versions of value_initialized (Boost release version 1.35 or
> higher) offer a workaround to these issues: value_initialized will
> now clear its internal data, prior to constructing the object that
> it contains."
> The fact that it's done unconditionally (as opposite only for compilers
> with the discussed issues) is IMHO a bug.

Agreed. Is this being fixed?

Dave Abrahams
BoostPro Computing

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