Boost C++ Libraries: Ticket #12289: Compile errors if you include boost/geometry/algorithms/buffer.hpp directly https://svn.boost.org/trac10/ticket/12289 <p> If you include boost/geometry/algorithms/buffer.hpp directly in Boost 1.61.0, you will get compile errors about cout not being part of std. The same was ok in Boost 1.58.0. There seems to be a missing include to iostream somewhere. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12289 Trac 1.4.3 Tony Lewis <tonyelewis@…> Thu, 11 Aug 2016 11:24:58 GMT <link>https://svn.boost.org/trac10/ticket/12289#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12289#comment:1</guid> <description> <p> I'm also seeing this problem with <code>boost/geometry/algorithms/comparable_distance.hpp</code>. </p> <p> Using the latest commit (<a class="ext-link" href="https://github.com/boostorg/geometry/tree/3ce8872b68c495f4e89b9db678a49b4db4ca9f3b"><span class="icon">​</span>3ce8872</a>) of the develop branch of the GitHub boostorg/geometry repo (and Boost 1.61.0 for the other libraries), both of the following commands fail: </p> <pre class="wiki">g++ -x c++ -isystem include -isystem /opt/boost_1_61_0_gcc_build/include include/boost/geometry/algorithms/comparable_distance.hpp clang++ -x c++ -isystem include -isystem /opt/boost_1_61_0_clang_build/include include/boost/geometry/algorithms/comparable_distance.hpp </pre><p> This violates the <a href="http://www.boost.org/development/header.html">Boost header policy</a>, which requires: </p> <blockquote class="citation"> <p> Make sure that a translation unit consisting of just the contents of the header file will compile successfully. </p> </blockquote> <p> The Clang errors are: </p> <pre class="wiki">In file included from include/boost/geometry/algorithms/comparable_distance.hpp:23: In file included from include/boost/geometry/algorithms/detail/comparable_distance/implementation.hpp:22: In file included from include/boost/geometry/algorithms/detail/distance/implementation.hpp:25: In file included from include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp:26: In file included from include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp:25: In file included from include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp:22: In file included from include/boost/geometry/index/rtree.hpp:30: In file included from include/boost/geometry/algorithms/touches.hpp:32: In file included from include/boost/geometry/algorithms/detail/overlay/overlay.hpp:27: In file included from include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp:30: include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp:201:10: error: no member named 'cout' in namespace 'std' std::cout &lt;&lt; " TODO: merge " &lt;&lt; cid0 &lt;&lt; " and " &lt;&lt; cid1 &lt;&lt; std::endl; ~~~~~^ include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp:320:26: error: no member named 'cout' in namespace 'std' std::cout &lt;&lt; " CONFLICT " &lt;&lt; std::endl; ~~~~~^ 2 errors generated. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Barend Gehrels</dc:creator> <pubDate>Fri, 12 Aug 2016 08:22:51 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12289#comment:2 https://svn.boost.org/trac10/ticket/12289#comment:2 <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.62.0</span> </li> </ul> <p> Thanks, it is fixed - we should not std::cout unless in define-conditional blocks </p> Ticket Tony Lewis <tonyelewis@…> Mon, 15 Aug 2016 08:14:04 GMT <link>https://svn.boost.org/trac10/ticket/12289#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12289#comment:3</guid> <description> <p> Yep - this works for me. </p> <p> That said, I've found that other Geometry headers fail to compile independently and I've opened <a class="new ticket" href="https://svn.boost.org/trac10/ticket/12393" title="#12393: Bugs: Some geometry headers fail to compile indepedently (new)">ticket:12393</a> about that. </p> <p> Thanks very much for your work on this ticket. </p> </description> <category>Ticket</category> </item> </channel> </rss>