Boost logo

Boost Users :

From: Johan Råde (rade_at_[hidden])
Date: 2006-08-08 11:56:17


Johan Råde wrote:

> I think the Rationale section in the array documentation should be
> updated, to include what we learnt during this discussion.
> Something like:
>
> "The array class does not have a non-template assignment operator.
> If one were addded, the array class would still be an aggregate, and
> could still be initialized with a double brace enclosed initializer
> list. However, the array class would not be a POD anynmore, and such
> initialization would not be done statically."
>
> --Johan Råde

The following might be better:

"The array class is designed to be an aggregate and a POD type.
Being an aggregate means that an array can be initialized with an
initializer list as follows:

boost::array<int,4> a = {{ 1, 2, 3 }};

Being a POD type ensure that such an initialization is done statically."

Currently the design rationale discusses the aggregate property but not
the POD property. But both are important.

This has been a long and confused thread. I think much of the confusion
has been caused by our failure, until today (thank you John), to realize
that were two issies involved: aggregates and POD.

--Johan Råde


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net