Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-06-05 22:52:41


Dave Harris wrote:
> In-Reply-To: <005501c566b3$1fc76eb0$2b792518_at_heronnest>
> cdiggins_at_[hidden] (christopher diggins) wrote (abridged):
>>> I strongly disagree. Forcing initialization makes code that is not
>>> useful for high performance numerical processing. When we declare a
>>> container of 1000000 elements, we don't want to waste time
>>> initializing each, unless we want to.
>>
>> I think the best solution in this case is to use an alternative
>> "collection" for numerical processing. Using a class intended as
>> general purpose array for numerical processing I think would not be a
>> good idea.
>
> I doubt we need a whole class. A special argument might do, to let us
> choose:
>
> boost::array<int,1000> b( boost::uninitialised );
> boost::array<int,1000> b( boost::initialised );

array can't be given constructors without sacrificing the aggregate
initialization syntax.

Jonathan


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