multi_array operator= and copy constructor have problem

I'm testing multi_array with a simple example:
typedef boost::multi_array

Greetings Yan, Only multi_arrays with the same size can be assigned to each other. You must explicitly resize B before trying to assign A to it. Cheers, ron On Jun 10, 2005, at 10:31 AM, Yan Zhang wrote:
I’m testing multi_array with a simple example: typedef boost::multi_array
array; array A(boost::extents[3][4][2]); A[0][0][0] = 3.14; array B; B = A; When execute the last statement B=A, you encounter assertion: assert(std::equal(other.shape(),other.shape()+this->num_dimensions(), this->shape())); in file multi_array_ref.hpp (line 476). I used VC++ 7.1 with debug build. Please advice. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Ronald Garcia
-
Yan Zhang