Subject: [Boost-bugs] [Boost C++ Libraries] #10471: Boost.Geometry fails to compile when OS X AssertMacros.h are included
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-06 01:16:16
#10471: Boost.Geometry fails to compile when OS X AssertMacros.h are included
--------------------------------------+---------------------------
Reporter: Robert Xiao <nneonneo@â¦> | Owner: barendgehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.55.0 | Severity: Problem
Keywords: |
--------------------------------------+---------------------------
The infamous AssertMacros.h header (see #2115) defines a macro called
"check", which causes a compilation failure in
<boost/geometry/geometries/concepts/check.hpp>. The header is
automatically included by certain Apple frameworks, so it's a bit
unavoidable.
Per the resolution to #2115, instances of the word "check" should be
replaced by something else to avoid this issue. (Damn you, Apple...)
Testcase program:
{{{
#include <AssertMacros.h>
#include <boost/geometry.hpp>
}}}
Compile with "c++ test.cpp". Compile errors:
{{{
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<Geometry>();
^~~~~~~~~~~~~~
dispatch::check
/opt/local/include/boost/geometry/geometries/concepts/check.hpp:68:8:
note:
'dispatch::check' declared here
struct check : not_implemented<GeometryTag>
^
... more errors about missing concept::check ...
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10471> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC