Boost logo

Boost :

Subject: Re: [boost] boost::mpl::for_each and value_initialized
From: Niels Dekker - address until 2010-10-10 (niels_address_until_2010-10-10_at_[hidden])
Date: 2010-01-26 10:27:40


>> Anyway, I wouldn't mind if the memset call in utility/value_init.hpp
>> would become conditional, for example as follows:
>>
>> #ifdef BOOST_VALUE_INITIALIZATION_NEEDS_MEMSET
>> std::memset(&x, 0, sizeof(x));
>> #endif

Fernando (the author of value_init) mailed me that it's okay to him if I add
an #ifdef like that to utility/value_init.hpp. Still I think it would be
useful to have the issue officially reported. Aleksey, were you already
planning to open a ticket on this issue? If so, please do! And please feel
free to assign the ticket to niels_dekker :-)

Of course, <boost/config/compiler/...> also needs to have
BOOST_VALUE_INITIALIZATION_NEEDS_MEMSET added to various compiler versions:

  MSVC (all versions)
  Borland/Codegear build < 12.0.3140.16150
  Sun (possibly all versions, I don't know exactly)
  GCC < 4.4.0

>> What do you think? And would it be okay to you to have such a macro,
>> BOOST_VALUE_INITIALIZATION_NEEDS_MEMSET, defined in
>> boost/config/compiler/, for those specific compiler versions?

Aleksey Gurtovoy wrote:
> Sounds good to me. John?

Hope it's okay to John as well.

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