[Boost-bugs] [Boost C++ Libraries] #12305: Requirements for traits::interior_{const, mutable}_type

Subject: [Boost-bugs] [Boost C++ Libraries] #12305: Requirements for traits::interior_{const, mutable}_type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-06-30 01:33:04


#12305: Requirements for traits::interior_{const,mutable}_type
------------------------------+------------------------------
 Reporter: john.firebaugh@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.61.0
 Severity: Problem | Keywords:
------------------------------+------------------------------
 The
 [http://www.boost.org/doc/libs/1_61_0/libs/geometry/doc/html/geometry/reference/concepts/concept_polygon.html
 documentation of Polygon Concept] states:

> there must be a specialization of `traits::interior_type` defining the
 type of the collection of its interior rings as type; **this collection
 itself must fulfill a Boost.Range Random Access Range Concept**

 (Emphasis mine; the mention of `traits::interior_type` should actually be
 `traits::interior_const_type` and `traits::interior_mutable_type` --
 ticket #12304 -- but the issue I'm reporting here has to do with the
 latter bolded part of the statement.)

 It appears that `boost::geometry::intersection` makes requirements on the
 interior type that are not a part of the Boost.Range Random Access Range
 Concept. Specifically,
 boost/geometry/algorithms/detail/overlay/convert_ring.hpp
 [https://github.com/boostorg/geometry/blob/boost-1.61.0/include/boost/geometry/algorithms/detail/overlay/convert_ring.hpp#L90
 calls `interior_rings(destination).resize(...)`], and `resize` is not part
 of the Random Access Range Concept.

 A test case is attached; it fails to compile with the following error:

 {{{
 <path>/boost/1.61.0/include/boost/geometry/algorithms/detail/overlay/convert_ring.hpp:90:45:
 error: no member named
       'resize' in
 'boost::iterator_range<std::__1::__wrap_iter<std::__1::vector<point,
 std::__1::allocator<point> > *> >'
                 interior_rings(destination).resize(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
 }}}


 Is this an error in convert_ring.hpp, or are there additional requirements
 on the interior type which are not documented?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12305>
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:20 UTC