Boost C++ Libraries: Ticket #13386: buffered_piece_collection.hpp: parse error in template argument list https://svn.boost.org/trac10/ticket/13386 <p> -In file included from /build/boost/install_1.66_0_mvapich/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp:34:0, </p> <blockquote> <p> from /build/boost/install_1.66_0_mvapich/include/boost/geometry/algorithms/buffer.hpp:40, from /build/boost/install_1.66_0_mvapich/include/boost/geometry/geometry.hpp:55, from /build/boost/install_1.66_0_mvapich/include/boost/geometry.hpp:17, from /build/nektar/nektar/library/FieldUtils/ProcessModules/ProcessInterpField.cpp:39: </p> </blockquote> <p> /build/boost/install_1.66_0_mvapich/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp: In member function ‘void boost::geometry::detail::buffer::buffered_piece_collection&lt;Ring, <a class="missing wiki">IntersectionStrategy</a>, <a class="missing wiki">RobustPolicy</a>&gt;::discard_turns_for_deflate()’: /build/boost/install_1.66_0_mvapich/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp:606:53: error: parse error in template argument list </p> <blockquote> <p> if (! prop.has_inflated &amp;&amp; prop.count &lt; 3) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> -Similar to <a class="new ticket" href="https://svn.boost.org/trac10/ticket/13368" title="#13368: Bugs: consuming_buffers.hpp: parse error in template argument list (new)">#13368</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13386 Trac 1.4.3 awulkiew Thu, 11 Jan 2018 01:00:23 GMT <link>https://svn.boost.org/trac10/ticket/13386#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13386#comment:1</guid> <description> <p> I don't think it's a problem in the Boost.Geometry. Looking at the discussion under the other bug report (<a class="new ticket" href="https://svn.boost.org/trac10/ticket/13368" title="#13368: Bugs: consuming_buffers.hpp: parse error in template argument list (new)">#13368</a>) it seems that it depends on the compiler and the order of includes. It looks like <code>count</code> is interpreted as a template by the compiler. We could add some workaround but this would be for the problem existing somewhere else. It would be better to find the actual cause. </p> <p> <del>What Boost libraries are you including and in what order?</del> </p> <p> <del>Could you experiment with the order of includes in order to find problematic library?</del> </p> <p> EDIT: It seems that it is related with Boost.Range. Code required to reproduce it looks like this: </p> <pre class="wiki">#include &lt;boost/range/algorithm/count.hpp&gt; #include &lt;boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp&gt; int main() {} </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>awulkiew</dc:creator> <pubDate>Thu, 11 Jan 2018 02:05:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13386#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13386#comment:2</guid> <description> <p> Even more distilled sample: </p> <pre class="wiki">namespace boost { template &lt;typename T&gt; void count(T) { } template &lt;typename T&gt; class A { struct B { int count; }; void foo() { B b; b.count &lt; 3; } }; } int main() {} </pre><p> It looks like a bug in the compiler. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 11 Jan 2018 16:36:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13386#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13386#comment:3</guid> <description> <p> Thanks for the investigation. I found a workaround since its the compiler. update line in buffered_piece_collection.hpp to if (! prop.has_inflated &amp;&amp; (prop.count) &lt; 3) </p> <p> forces the compiler to interpret correctly. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 28 Feb 2018 19:00:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13386#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13386#comment:4</guid> <description> <p> bug also occurs with gcc 5.4 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 26 Mar 2018 20:58:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13386#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13386#comment:5</guid> <description> <p> Seconding that this bug exists in gcc 5.5 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Barend Gehrels</dc:creator> <pubDate>Tue, 27 Mar 2018 19:39:27 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/13386#comment:6 https://svn.boost.org/trac10/ticket/13386#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.67.0</span> </li> </ul> <p> Fixed, will try to get it into 1.67 Thanks for the report, the analysis and the workaround </p> Ticket