Subject: Re: [boost] boost::mpl::for_each and value_initialized
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2010-01-22 02:01:38
On Wed, 13 Jan 2010 11:11:20 -0600, Niels Dekker - address until
2010-10-10 <niels_address_until_2010-10-10_at_[hidden]> wrote:
> Peter Foelsche wrote:
>> in boost_1_41_0 there is still an unconditional call to memset in
> Fernando Cacciola and I originally added the memset call within
> value_initialized() for MSVC only, because MSVC's implementation of
> value-initialization was known to incorrectly leave some bytes
> uninitialized, in some very relevant use cases.
> Thereby we also added extra unit tests, which were passed by MSVC by
> then, because of the memset. But unfortunately they failed on other
> compilers (GCC, Borland/Codegear and Sun), because of similar
> value-initialization issues. That's when we thought it was wise to just
> have the memset call there for all compilers:
> Do I understand correctly that you want the memset call to be skipped
> for those compiler versions that have implemented value-initialization
> entirely correctly? Do you know exactly which compiler versions do
> implement value-initialization correctly?
Personally, I believe the assumption that by default compilers get
this wrong is incorrect and should be revised. IOW, I think we should
revert to the approach of applying the workaround conditionally for the
specific compilers known to be buggy, and just those -- especially if
we have tests to discover these bugs should they return.
As for the specific compiler versions:
- GCC bugs #30111 and #33916 has been fixed in 4.4 and 4.2.4
correspondingly , .
- MSVC bug #100744, despite being marked as "Closed, Won't Fix" ,
has actually been fixed in VC9 .
- Borland bug #51854 is also reported as being fixed in build
-- Aleksey Gurtovoy MetaCommunications Engineering
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk