|
Boost Users : |
From: Ronald Garcia (garcia_at_[hidden])
Date: 2005-06-13 09:56:35
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<double, 3> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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