Modify

Ticket #8204 (closed Bugs: fixed)

Opened 14 months ago

Last modified 14 months ago

xpressive enum clashing with glx

Reported by: benjamin.prestele@… Owned by: eric_niebler
Milestone: To Be Determined Component: xpressive
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc:

Description

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 -

Attachments

Change History

comment:1 Changed 14 months ago by eric_niebler

(In [83303]) avoid name clash with macro None in glx.h, refs #8204

comment:2 Changed 14 months ago by eric_niebler

  • Status changed from new to closed
  • Resolution set to fixed

(In [83389]) merge [83303] from trunk, fixes #8204

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.