
Dave Harris wrote:
In-Reply-To: <005501c566b3$1fc76eb0$2b792518@heronnest> cdiggins@videotron.ca (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