Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11650: boost range size() fails concept on subarray of a const multi_array
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-09-14 15:21:34
#11650: boost range size() fails concept on subarray of a const multi_array
------------------------------------------+------------------------
Reporter: John Reid <johnbaronreid@â¦> | Owner: neilgroves
Type: Bugs | Status: new
Milestone: To Be Determined | Component: range
Version: Boost 1.59.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------------+------------------------
Comment (by neilgroves):
It appears that the multi_array const_sub_array is not a valid model of a
RandomAccessRange Concept because the iterator type id not defined.
A change to multi_array could make it work, I see two possibilities:
1. Implement const_sub_array::iterator to be equal to
const_sub_array::const_iterator. This has been done in Boost.Range
sub_range without issue for sometime. This is semantically very similar
since it needs to preserve constant-ness from a template parameter.
2. The multi_array could have a specialization of boost::range_iterator to
avoid using the default Boost.Range iterator type deduction.
My recommendation would be 1.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11650#comment:1> 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:50:19 UTC