Opened 6 years ago
Last modified 6 years ago
#12305 new Bugs
Requirements for traits::interior_{const,mutable}_type
Reported by: | Owned by: | Barend Gehrels | |
---|---|---|---|
Milestone: | To Be Determined | Component: | geometry |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: | john.firebaugh@… |
Description
The 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 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?
Attachments (1)
Change History (6)
by , 6 years ago
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Component: | None → polygon |
---|---|
Owner: | set to |
Assign to the good library next time.
comment:4 by , 6 years ago
Component: | polygon → geometry |
---|---|
Owner: | changed from | to
Any Boost developers have insight on this problem?