Subject: [Boost-bugs] [Boost C++ Libraries] #1461: multi_array::resize index error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-11-18 20:49:01
#1461: multi_array::resize index error
-------------------------------------+--------------------------------------
Reporter: wasti.redl_at_[hidden] | Owner: garcia
Type: Bugs | Status: new
Milestone: To Be Determined | Component: multi_array
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
multi_array::resize wants to copy the old data to the new. However, it
confuses the old and new arrays when calculating the indices for the
subviews. As a result, creating the view asserts.
Minimal crashing example:
#include <boost/multi_array.hpp>
int main()
{
typedef boost::multi_array<int, 1> ar_t;
typedef ar_t::extent_range range;
ar_t ar;
ar.resize(boost::extents[range(-3, 3)]);
}
The attached patched solves the problem.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1461>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC