
Fernando Cacciola wrote:
OK, only seven months after Eduard's inital request I finally made the time to really look at it :)
Thanks, Fernando! Sorry for snipping out large pieces of your reply.
So I'd go for Eduard's patch.
For anyone else following this discussion, Eduard's patch, which adds direct-initialization to boost::value_initialized<T>, is at https://svn.boost.org/trac/boost/attachment/ticket/3472/value_init.patch
So, let's just add the plain and simple explicit ctor :) [Neils, feel free to argue back :)
Okay, here I go: Suppose, a long time ago you wrote a class named foo::const_iterator, which provides const access to foo's items. Now you happen to need non-const access as well. Will you add this as an extra feature to foo::const_iterator? I hope not. I hope, you'd rather write an extra class, named foo::iterator. Now we're having a template class named boost::value_initialized<T>, which provides value-initialization. And we happen to need non-value-initialization as well, as reported by #3472. I still believe an extra boost::initialized<T> template class is the best choice. As was suggested by Jeff: https://svn.boost.org/trac/boost/attachment/ticket/3472/initialized.patch Kind regards, Niels -- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center