Boost C++ Libraries: Ticket #12305: Requirements for traits::interior_{const,mutable}_type https://svn.boost.org/trac10/ticket/12305 <p> The <a href="http://www.boost.org/doc/libs/1_61_0/libs/geometry/doc/html/geometry/reference/concepts/concept_polygon.html">documentation of Polygon Concept</a> states: </p> <blockquote class="citation"> <p> there must be a specialization of <code>traits::interior_type</code> defining the type of the collection of its interior rings as type; <strong>this collection itself must fulfill a Boost.Range Random Access Range Concept</strong> </p> </blockquote> <p> (Emphasis mine; the mention of <code>traits::interior_type</code> should actually be <code>traits::interior_const_type</code> and <code>traits::interior_mutable_type</code> -- ticket <a class="new ticket" href="https://svn.boost.org/trac10/ticket/12304" title="#12304: Bugs: Incorrect documentation for boost::geometry::traits::ring_type (new)">#12304</a> -- but the issue I'm reporting here has to do with the latter bolded part of the statement.) </p> <p> It appears that <code>boost::geometry::intersection</code> 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 <a class="ext-link" href="https://github.com/boostorg/geometry/blob/boost-1.61.0/include/boost/geometry/algorithms/detail/overlay/convert_ring.hpp#L90"><span class="icon">​</span>calls `interior_rings(destination).resize(...)`</a>, and <code>resize</code> is not part of the Random Access Range Concept. </p> <p> A test case is attached; it fails to compile with the following error: </p> <pre class="wiki">&lt;path&gt;/boost/1.61.0/include/boost/geometry/algorithms/detail/overlay/convert_ring.hpp:90:45: error: no member named 'resize' in 'boost::iterator_range&lt;std::__1::__wrap_iter&lt;std::__1::vector&lt;point, std::__1::allocator&lt;point&gt; &gt; *&gt; &gt;' interior_rings(destination).resize( ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ </pre><p> Is this an error in convert_ring.hpp, or are there additional requirements on the interior type which are not documented? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12305 Trac 1.4.3 anonymous Thu, 30 Jun 2016 01:33:33 GMT attachment set https://svn.boost.org/trac10/ticket/12305 https://svn.boost.org/trac10/ticket/12305 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost.cpp</span> </li> </ul> Ticket anonymous Mon, 25 Jul 2016 16:14:25 GMT <link>https://svn.boost.org/trac10/ticket/12305#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12305#comment:1</guid> <description> <p> Any Boost developers have insight on this problem? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 25 Jul 2016 16:14:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12305#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12305#comment:1</guid> <description> <p> Any Boost developers have insight on this problem? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 19 Aug 2016 21:20:11 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/12305#comment:2 https://svn.boost.org/trac10/ticket/12305#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Lucanus Simonson</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">polygon</span> </li> </ul> <p> Assign to the good library next time. </p> Ticket anonymous Tue, 23 Aug 2016 00:24:33 GMT <link>https://svn.boost.org/trac10/ticket/12305#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12305#comment:3</guid> <description> <p> This should be assigned to "geometry" not polygon. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 02 Nov 2016 14:07:41 GMT</pubDate> <title>owner, component changed https://svn.boost.org/trac10/ticket/12305#comment:4 https://svn.boost.org/trac10/ticket/12305#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Lucanus Simonson</span> to <span class="trac-author">Barend Gehrels</span> </li> <li><strong>component</strong> <span class="trac-field-old">polygon</span> → <span class="trac-field-new">geometry</span> </li> </ul> Ticket