Boost C++ Libraries: Ticket #10467: Boost.Geometry fails to compile on OS X if sys/termios.h is included https://svn.boost.org/trac10/ticket/10467 <p> On OS X, sys/termios.h defines the symbol B0 as 0. </p> <p> With Boost 1.56.0, including sys/termios.h before boost/geometry/algorithms/assign.hpp causes a compilation failure which looks like this: </p> <pre class="wiki">In file included from test.cpp:2: /opt/local/include/boost/geometry/algorithms/assign.hpp:320:50: error: expected a qualified name after 'typename' template &lt;BOOST_VARIANT_ENUM_PARAMS(typename A), BOOST_VARIANT_ENUM_PARAMS(typename B)&gt; ^ /opt/local/include/boost/variant/variant_fwd.hpp:164:5: note: expanded from macro 'BOOST_VARIANT_ENUM_PARAMS' BOOST_PP_ENUM_PARAMS(BOOST_VARIANT_LIMIT_TYPES, param) ^ /opt/local/include/boost/preprocessor/repetition/enum_params.hpp:24:71: note: expanded from macro 'BOOST_PP_ENUM_PARAMS' # define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) ^ /opt/local/include/boost/preprocessor/repetition/repeat.hpp:38:60: note: expanded from macro 'BOOST_PP_REPEAT_1' # define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d) ^ note: (skipping 21 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /opt/local/include/boost/preprocessor/repetition/enum_params.hpp:30:67: note: expanded from macro 'BOOST_PP_ENUM_PARAMS_M' # define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n ^ &lt;scratch space&gt;:13:1: note: expanded from here B0 ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/termios.h:291:12: note: expanded from macro 'B0' #define B0 0 ^ </pre><p> The problem is that BOOST_VARIANT_ENUM_PARAMS(typename B) expands to a series of type params including "typename B0", which is then further expanded to "typename 0" by the B0 macro, and that causes a compilation failure. </p> <p> This is a regression: the observed behaviour did not appear under Boost 1.55.0. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10467 Trac 1.4.3 Robert Xiao <nneonneo@…> Fri, 05 Sep 2014 22:51:20 GMT cc set https://svn.boost.org/trac10/ticket/10467#comment:1 https://svn.boost.org/trac10/ticket/10467#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">nneonneo@…</span> added </li> </ul> Ticket awulkiew Tue, 16 Dec 2014 22:25:18 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/10467#comment:2 https://svn.boost.org/trac10/ticket/10467#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.58.0</span> </li> </ul> <p> Fixed in develop: <a class="ext-link" href="https://github.com/boostorg/geometry/commit/5fad5e3b7db2f980c13fdf4b07aaad7876f4c364"><span class="icon">​</span>https://github.com/boostorg/geometry/commit/5fad5e3b7db2f980c13fdf4b07aaad7876f4c364</a> </p> Ticket