Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2008-05-24 10:44:05


Author: hkaiser
Date: 2008-05-24 10:44:05 EDT (Sat, 24 May 2008)
New Revision: 45709
URL: http://svn.boost.org/trac/boost/changeset/45709

Log:
Wave: fixed var() ambiguity reported by gcc 4.3
Text files modified:
   trunk/boost/wave/grammars/cpp_chlit_grammar.hpp | 42 +++++++++++++++++++--------------------
   trunk/boost/wave/grammars/cpp_intlit_grammar.hpp | 17 +++++++--------
   2 files changed, 28 insertions(+), 31 deletions(-)

Modified: trunk/boost/wave/grammars/cpp_chlit_grammar.hpp
==============================================================================
--- trunk/boost/wave/grammars/cpp_chlit_grammar.hpp (original)
+++ trunk/boost/wave/grammars/cpp_chlit_grammar.hpp 2008-05-24 10:44:05 EDT (Sat, 24 May 2008)
@@ -154,9 +154,7 @@
         definition(chlit_grammar const &self)
         {
             using namespace boost::spirit::classic;
- using phoenix::var;
- using phoenix::val;
- using phoenix::arg1;
+ namespace phx = phoenix;
             
             // special parsers for '\x..' and L'\x....'
             typedef uint_parser<
@@ -168,65 +166,65 @@
 
             // the rule for a character literal
             ch_lit
- = eps_p[self.value = val(0), self.long_lit = val(false)]
- >> !ch_p('L')[self.long_lit = val(true)]
+ = eps_p[self.value = phx::val(0), self.long_lit = phx::val(false)]
+ >> !ch_p('L')[self.long_lit = phx::val(true)]
>> ch_p('\'')
>> +( (
                             ch_p('\\')
>> ( ch_p('a') // BEL
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val(0x07))
+ phx::var(self.overflow), phx::val(0x07))
                                     ]
                                 | ch_p('b') // BS
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val(0x08))
+ phx::var(self.overflow), phx::val(0x08))
                                     ]
                                 | ch_p('t') // HT
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val(0x09))
+ phx::var(self.overflow), phx::val(0x09))
                                     ]
                                 | ch_p('n') // NL
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val(0x0a))
+ phx::var(self.overflow), phx::val(0x0a))
                                     ]
                                 | ch_p('v') // VT
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val(0x0b))
+ phx::var(self.overflow), phx::val(0x0b))
                                     ]
                                 | ch_p('f') // FF
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val(0x0c))
+ phx::var(self.overflow), phx::val(0x0c))
                                     ]
                                 | ch_p('r') // CR
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val(0x0d))
+ phx::var(self.overflow), phx::val(0x0d))
                                     ]
                                 | ch_p('?')
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val('?'))
+ phx::var(self.overflow), phx::val('?'))
                                     ]
                                 | ch_p('\'')
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val('\''))
+ phx::var(self.overflow), phx::val('\''))
                                     ]
                                 | ch_p('\"')
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val('\"'))
+ phx::var(self.overflow), phx::val('\"'))
                                     ]
                                 | ch_p('\\')
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), val('\\'))
+ phx::var(self.overflow), phx::val('\\'))
                                     ]
                                 | ch_p('x')
>> if_p(self.long_lit)
@@ -234,7 +232,7 @@
                                             hex_wchar_parser_type()
                                             [
                                                 impl::compose(self.value, self.long_lit,
- var(self.overflow), arg1)
+ phx::var(self.overflow), phx::arg1)
                                             ]
                                         ]
                                         .else_p
@@ -242,32 +240,32 @@
                                             hex_char_parser_type()
                                             [
                                                 impl::compose(self.value, self.long_lit,
- var(self.overflow), arg1)
+ phx::var(self.overflow), phx::arg1)
                                             ]
                                         ]
                                 | ch_p('u')
>> uint_parser<unsigned int, 16, 4, 4>()
                                         [
                                             impl::compose(self.value, self.long_lit,
- var(self.overflow), arg1)
+ phx::var(self.overflow), phx::arg1)
                                         ]
                                 | ch_p('U')
>> uint_parser<unsigned int, 16, 8, 8>()
                                         [
                                             impl::compose(self.value, self.long_lit,
- var(self.overflow), arg1)
+ phx::var(self.overflow), phx::arg1)
                                         ]
                                 | uint_parser<unsigned int, 8, 1, 3>()
                                     [
                                         impl::compose(self.value, self.long_lit,
- var(self.overflow), arg1)
+ phx::var(self.overflow), phx::arg1)
                                     ]
                                 )
                             )
                         | ~eps_p(ch_p('\'')) >> anychar_p
                             [
                                 impl::compose(self.value, self.long_lit,
- var(self.overflow), arg1)
+ phx::var(self.overflow), phx::arg1)
                             ]
                         )
>> ch_p('\'')

Modified: trunk/boost/wave/grammars/cpp_intlit_grammar.hpp
==============================================================================
--- trunk/boost/wave/grammars/cpp_intlit_grammar.hpp (original)
+++ trunk/boost/wave/grammars/cpp_intlit_grammar.hpp 2008-05-24 10:44:05 EDT (Sat, 24 May 2008)
@@ -83,8 +83,7 @@
         definition(intlit_grammar const &self)
         {
             using namespace boost::spirit::classic;
- using phoenix::var;
- using phoenix::arg1;
+ namespace phx = phoenix;
  
             
             int_lit = (
@@ -93,8 +92,8 @@
                         | dec_lit
                         )
>> !as_lower_d[
- (ch_p('u')[var(self.is_unsigned) = true] || ch_p('l'))
- | (ch_p('l') || ch_p('u')[var(self.is_unsigned) = true])
+ (ch_p('u')[phx::var(self.is_unsigned) = true] || ch_p('l'))
+ | (ch_p('l') || ch_p('u')[phx::var(self.is_unsigned) = true])
                             ]
                     ,
 
@@ -102,23 +101,23 @@
                             (ch_p('X') | ch_p('x'))
>> uint_parser<uint_literal_type, 16>()
                             [
- self.val = arg1,
- var(self.is_unsigned) = true
+ self.val = phx::arg1,
+ phx::var(self.is_unsigned) = true
                             ]
                     ,
                         
                     oct_lit =
                        !uint_parser<uint_literal_type, 8>()
                         [
- self.val = arg1,
- var(self.is_unsigned) = true
+ self.val = phx::arg1,
+ phx::var(self.is_unsigned) = true
                         ]
                     ,
                         
                     dec_lit =
                         uint_parser<uint_literal_type, 10>()
                         [
- self.val = arg1
+ self.val = phx::arg1
                         ]
                     )
                 ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk