In article <bs82kj$199$>, Buster wrote:
> "Jim West" wrote
>
>> The GNU implementation of the valarray header (g++ version 3.3.2)
>> includes the comment:
>>
>> // This complication is so to make valarray<valarray<T> > work
>> // even though it is not required by the standard. Nobody should
>> // be saying valarray<valarray<T> > anyway. See the specs.
>>
>> Unfortunately, "See the specs" does not give me a whole lot of insight
>> to why this is a Bad Idea(tm). Can someone please enlighten me?
>
> You use slices to make multidimensional arrays with valarray. See the
> standard or a good textbook.
Thanks for the response. I do indeed use slices (or Blitz) when using
multidimensional arrays. The nature of the comment made me think that
there might be some non-obvious reason why valarray<valarray<T> > would
give incorrect results, rather than just be inefficient.
|