[Boost-bugs] [Boost C++ Libraries] #8204: xpressive enum clashing with glx

Subject: [Boost-bugs] [Boost C++ Libraries] #8204: xpressive enum clashing with glx
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-28 17:15:24


#8204: xpressive enum clashing with glx
-------------------------------------------------+--------------------------
 Reporter: benjamin.prestele@… | Owner: eric_niebler
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: xpressive
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+--------------------------
 On Ubuntu 12.04, some header included by GL/glx.h seems to define a macro
 'None', which replaces the enum by the same name in
 boost/xpressive/match_results.hpp at line 122. Therefore the following
 simple testcase fails to compile:

 {{{
 #include <GL/glx.h>
 #include "boost/xpressive/xpressive.hpp"

 int main( int argc, char** argv )
 {
   return 0;
 }
 }}}


 Giving the following error with g++:


 {{{
 In file included from
 ../workspace/Boost_1_53_0/boost/xpressive/detail/core/access.hpp:21:0,
                  from
 ../workspace/Boost_1_53_0/boost/xpressive/detail/core/state.hpp:18,
                  from
 ../workspace/Boost_1_53_0/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp:20,
                  from
 ../workspace/Boost_1_53_0/boost/xpressive/detail/core/matchers.hpp:17,
                  from
 ../workspace/Boost_1_53_0/boost/xpressive/regex_primitives.hpp:22,
                  from
 ../workspace/Boost_1_53_0/boost/xpressive/xpressive_static.hpp:24,
                  from
 ../workspace/Boost_1_53_0/boost/xpressive/xpressive.hpp:18,
                  from test2.cpp:2:
 ../workspace/Boost_1_53_0/boost/xpressive/match_results.hpp:122:21: error:
 expected identifier before numeric constant
 ../workspace/Boost_1_53_0/boost/xpressive/match_results.hpp:122:21: error:
 expected ‘}’ before numeric constant
 ../workspace/Boost_1_53_0/boost/xpressive/match_results.hpp:122:21: error:
 expected unqualified-id before numeric constant
 ../workspace/Boost_1_53_0/boost/xpressive/match_results.hpp:132:57: error:
 â€˜traits’ has not been declared
 ../workspace/Boost_1_53_0/boost/xpressive/match_results.hpp:132:63: error:
 expected ‘,’ or ‘...’ before ‘<’ token
 ../workspace/Boost_1_53_0/boost/xpressive/match_results.hpp:163:63: error:
 â€˜transform_op’ has not been declared
 ../workspace/Boost_1_53_0/boost/xpressive/match_results.hpp:194:5: error:
 â€˜traits’ does not name a type
 ../workspace/Boost_1_53_0/boost/xpressive/match_results.hpp:195:5: error:
 â€˜transform_op’ does not name a type
 - snip -
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8204>
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:12 UTC