
Peter Foelsche wrote:
in boost_1_41_0 there is still an unconditional call to memset in value_initialized()
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. https://svn.boost.org/trac/boost/changeset/39157/trunk/boost/utility/value_i... 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: https://svn.boost.org/trac/boost/changeset/41942/trunk/boost/utility/value_i... 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 do appreciate that the behavior of value_initialized is now exactly the same for all compilers. But I do understand you're concerned about the performance penalty of the memset call, for those compilers that have implemented value-initialization correctly. If so, can you please create a ticket, preferably including a patch? Kind regards, Niels -- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center