[multi_array] Assertion when resizing empty array
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 ::size_type*, const typename
boost::detail::multi_array::associated_types My compiler is:
john@john-dell:~/Dev/MyProjects/Bio/hmm$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
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.
John Reid
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
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#... 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
participants (2)
-
John Reid
-
Mikhail Levin