Boost C++ Libraries: Ticket #10471: Boost.Geometry fails to compile when OS X AssertMacros.h are included https://svn.boost.org/trac10/ticket/10471 <p> The infamous <a class="missing wiki">AssertMacros</a>.h header (see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2115" title="#2115: Bugs: Avoid bad Apple macros (closed: fixed)">#2115</a>) defines a macro called "check", which causes a compilation failure in &lt;boost/geometry/geometries/concepts/check.hpp&gt;. The header is automatically included by certain Apple frameworks, so it's a bit unavoidable. </p> <p> Per the resolution to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2115" title="#2115: Bugs: Avoid bad Apple macros (closed: fixed)">#2115</a>, instances of the word "check" should be replaced by something else to avoid this issue. (Damn you, Apple...) </p> <p> Testcase program: </p> <pre class="wiki">#include &lt;AssertMacros.h&gt; #include &lt;boost/geometry.hpp&gt; </pre><p> Compile with "c++ test.cpp". Compile errors: </p> <pre class="wiki">In file included from test.cpp:2: In file included from /opt/local/include/boost/geometry.hpp:17: In file included from /opt/local/include/boost/geometry/geometry.hpp:43: In file included from /opt/local/include/boost/geometry/strategies/strategies.hpp:31: In file included from /opt/local/include/boost/geometry/strategies/intersection.hpp:15: In file included from /opt/local/include/boost/geometry/policies/relate/intersection_points.hpp:19: In file included from /opt/local/include/boost/geometry/algorithms/detail/assign_indexed_point.hpp:20: /opt/local/include/boost/geometry/geometries/concepts/check.hpp:217:1: error: expected unqualified-id { ^ In file included from test.cpp:2: In file included from /opt/local/include/boost/geometry.hpp:17: In file included from /opt/local/include/boost/geometry/geometry.hpp:43: In file included from /opt/local/include/boost/geometry/strategies/strategies.hpp:31: In file included from /opt/local/include/boost/geometry/strategies/intersection.hpp:15: In file included from /opt/local/include/boost/geometry/policies/relate/intersection_points.hpp:19: In file included from /opt/local/include/boost/geometry/algorithms/detail/assign_indexed_point.hpp:21: In file included from /opt/local/include/boost/geometry/algorithms/detail/assign_values.hpp:29: /opt/local/include/boost/geometry/algorithms/append.hpp:217:9: error: no template named 'check' in namespace 'boost::geometry::concept'; did you mean 'dispatch::check'? concept::check&lt;Geometry&gt;(); ^~~~~~~~~~~~~~ dispatch::check /opt/local/include/boost/geometry/geometries/concepts/check.hpp:68:8: note: 'dispatch::check' declared here struct check : not_implemented&lt;GeometryTag&gt; ^ ... more errors about missing concept::check ... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10471 Trac 1.4.3 rsf@… Tue, 14 Oct 2014 21:59:51 GMT <link>https://svn.boost.org/trac10/ticket/10471#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10471#comment:1</guid> <description> <p> In the cited Apple header file AssertMacros.h there is a note that defining the macro __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES as 0 will suppress the definition of the conflicting macro names, in favor of more portable names (e.g. __Check). (It is further noted that this will be the default in a future version of AssertMacros.h; until then the recommendation is for the user to add this definition to their compiler options.) </p> <p> Perhaps documenting this workaround will be adequate. </p> </description> <category>Ticket</category> </item> </channel> </rss>