Boost logo

Boost :

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
value_initialized<T>: 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
Scientific programmer at LKEB, Leiden University Medical Center

Boost list run by bdawes at, gregod at, cpdaniel at, john at