Subject: Re: [boost] [utility/value_init] boost::value_initialized<T> direct-initialized?
From: Niels Dekker - address until 2010-10-10 (niels_address_until_2010-10-10_at_[hidden])
Date: 2010-04-08 14:58:41
Robert Stewart wrote:
> Given that, I have to agree with Fernando that initialize is
> merely a superset of value_initialize and can be harder to explain
> unless it derives from value_initialize (even if it shares nothing
> from the base and only makes clear that it is a superset).
Thanks, Robert. But do you mean public inheritance? You know, I once
considered having initialized<T> publicly derived from
http://lists.boost.org/Archives/boost/2010/03/164356.php But then I
realized that it would imply that any "initialized" object is also a
value_initialized object. While certainly an initialized object does not
need to be value-initialized.
Therefor I think composition is preferable to public inheritance, in
this case. I really don't see what's wrong about the patch I submitted,
having value_initialized<T> containing a private initialized<T> data
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