26 Feb
2009
26 Feb
'09
10:40 a.m.
I've never tried to write a multi array class so perhaps I'm looking at the problem too simplistically. With std::vector (and probably all containers?) operator= will potentially reallocate, so I don't understand why boost::multi_array should be special. It's not really a *surprise* reallocation is it? operator= implies to me that you want to forget what's currently being held and assume a copy of the data that the other object has. I'd be *expecting* reallocations and existing indices/iterators to be invalidated. I've only just started using multi_array and I know there's a lot more to it than I'm aware of so apologies if my view on operator= is based more on ignorance than enlightenment! Regards, Pete