Boost logo

Boost Users :

Subject: Re: [Boost-users] [multi_array] Assertion when resizing empty array
From: Mikhail Levin (svarneticist_at_[hidden])
Date: 2009-07-22 18:35:05


John Reid <j.reid <at> mail.cryst.bbk.ac.uk> writes:

>
> Resizing an empty array no longer seems to work. My code worked fine
> with boost 1.38, now it causes an assertion with the latest boost trunk
> from svn. The code is:
>
> #include <boost/multi_array.hpp>
>
> int
> main( int argc, char * argv[] ) {
> boost::multi_array< double, 2 > a;
> a.resize( boost::extents[2][3] );
> return 0;
> }
>

>
> I updated from svn today.
>
> I think the code creates a view on the old data in order to retain it.
> The assertion happens because this view is empty.
>
> Regards,
> John.
>

It appears to be a bug. See
http://www.boost.org/development/tests/trunk/developer/issues_release_.html#multi_array
Hopefully it will be fixed soon.
I had same problem. I rolled boost/multi_array.hpp back to revision 41257 and
it works for me now.

Mikhail


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