Boost logo

Boost Users :

Subject: Re: [Boost-users] [multi_array] operator= requires resize - why?
From: Etienne Bresciani (etienne.bresciani_at_[hidden])
Date: 2012-06-04 06:41:56


I have a couple of questions about this topic that seems to keep with beeing
mind-bugging for several boost users (see more recent posts on this).

Ronald Garcia wrote
> Multiarray was meant in particular to be a Generic array library. In
> particular, all the array data structures were designed to model the
> MultiArray concept, which is specified in the reference
> documentation. [...] The concept covers
> assignment between arrays

I do not find that in the reference documentation. The assignment is covered
when talking about multi_array, not when defining the MultiArray concept.

Ronald Garcia wrote
> If multi_array's assignment
> had different semantics from the rest of the arrays, then assignment
> would behave very differently generic algorithms depending on whether
> you pass a multi_array or a different function.

I cannot get why introducing automatically resizing would cause any trouble
for any generic algorithm, since it would not prevent from calling the
assignment for objects that do have the same shape. Do you have any precise
example to explain why it would be such a trouble?

Regards,
Etienne

--
View this message in context: http://boost.2283326.n4.nabble.com/multi-array-operator-requires-resize-why-tp2563752p4630881.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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