Boost logo

Boost :

From: Tomasz Kowalczyk (tomek_at_[hidden])
Date: 2000-05-29 06:24:53


jsiek_at_[hidden] wrote:
>
> This is a nice idea... I think this approach works well for Blitz
> arrays.

I am not familiar with Blitz, but it is enough to glance at the code to
notice that despite similar syntax the machinery is quite different.
Blitz does not allow you to construct array elements with given
initialization list. It only provides a convenient notation for element
_assignment_. Such thing can be trivially added to array<> at wish and
it might be pretty useful btw.

In this case, the problem is how to _construct_ elements in a member
array of a non-aggregate.

Unfortunately, as you have kindly noted, given the current state of C++
the drawbacks and limitations of possible solutions to this problem
outweight the benefits.

Tomasz

> However, my main problem with it is that it adds a lot of
> complexity, and certainly some compile-time overhead compared to the
> aggregate initialization. For a light-weight class like array I'm not
> sure the benefits outweigh the costs.
>
> Cheers,
>
> Jeremy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk