
on Tue Aug 28 2007, "Niels Dekker - mail address until 2008-12-31" <nd_mail_address_valid_until_2008-12-31-AT-xs4all.nl> wrote:
Fernando Cacciola and I developed a new version of value_init.hpp, offering a workaround. The file is attached to the ticket: http://svn.boost.org/trac/boost/attachment/ticket/1217/value_init_MSVC_worka...
The workaround version stores the bytes of the T object that is wrapped by value_initialized<T> as an instance of aligned_storage::type. During the construction of value_initialized<T>, it clears the bytes of T (using memset), just before constructing T itself, by placement new:
std::memset(&x, 0, sizeof(x)); new (&x) T();
The workaround is enabled by defining a macro, BOOST_UTILITY_VALUE_INIT_WORKAROUND.
As I never contributed to a Boost library before, what should I do in order to get this workaround reviewed, and hopefully get it into the library?
Thanks for your work on this! I think Fernando is entirely qualified to review it, and he has commit privileges on the repository, so I've reassigned the ticket to him. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com