Boost logo

Boost :

Subject: Re: [boost] boost::mpl::for_each and value_initialized
From: Peter Foelsche (peter_foelsche_at_[hidden])
Date: 2010-01-07 16:47:40


"Peter Foelsche" <peter_foelsche_at_[hidden]> wrote in message
news:h7rie8$i9u$1_at_ger.gmane.org...
>
> "Aleksey Gurtovoy" <agurtovoy_at_[hidden]> wrote in message
> news:op.uzp57jgyccf1k7_at_wonderland.office.meta...
>
>> Could you verify whether the gcc will optimize away the rest of the
>> value_initialized magic if the memset is out?
>
> Ok -- I removed memset from value_initialized and I restored for_each.hpp
> to is original state.
> Now gcc 4.4.1 with optimization also does not create any (assembler) code
> for the initialization of this anyway not used parameter.

in boost_1_41_0 there is still an unconditional call to memset in
value_initialized()

Peter


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