Boost logo

Boost Users :

Subject: Re: [Boost-users] [multi_array] operator= requires resize - why?
From: Rhys Ulerich (rhys.ulerich_at_[hidden])
Date: 2012-06-04 11:01:35


>> Now what should the
>> generic algorithm do? If it resizes the 3D subproblem bad things
>> happen to the original 4D multi_array.

> I completely understand that many generic algorithms require that sizes
> match. And we agree on that they should not resize any of the
> (sub-)multi_array. But I'm afraid this is missing the point. My feeling
> is that generic algorithm should check that the sizes match if it
> requires so, NOT the assignment operator. What the assignment operator
> should require seems largely independent to me.

The assignment operator is implemented using a generic,
dimension-agnostic, iterator-based copy. The implementation does not
know when resizing is safe and therefore does not resize.

- Rhys


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