Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67512 - trunk/boost/spirit/home/qi/numeric
From: hartmut.kaiser_at_[hidden]
Date: 2010-12-30 21:58:41


Author: hkaiser
Date: 2010-12-30 21:58:40 EST (Thu, 30 Dec 2010)
New Revision: 67512
URL: http://svn.boost.org/trac/boost/changeset/67512

Log:
Spirit: fixing compilation problems in Qi numerics
Text files modified:
   trunk/boost/spirit/home/qi/numeric/int.hpp | 24 ++++++++++++++++++------
   trunk/boost/spirit/home/qi/numeric/uint.hpp | 28 +++++++++++++++++++++++-----
   2 files changed, 41 insertions(+), 11 deletions(-)

Modified: trunk/boost/spirit/home/qi/numeric/int.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/int.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/int.hpp 2010-12-30 21:58:40 EST (Thu, 30 Dec 2010)
@@ -20,7 +20,7 @@
 #include <boost/spirit/home/support/common_terminals.hpp>
 #include <boost/spirit/home/support/info.hpp>
 #include <boost/mpl/assert.hpp>
-#include <boost/preprocessor/seq.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
 
 namespace boost { namespace spirit
 {
@@ -46,14 +46,20 @@
         BOOST_PP_SEQ_FOR_EACH(BOOST_SPIRIT_ENABLE_INTEGER, _, names) \
     /***/
 
+#ifdef BOOST_HAS_LONG_LONG
     BOOST_SPIRIT_ENABLE_INTEGERS(
         (short_)
         (int_)
         (long_)
- #ifdef BOOST_HAS_LONG_LONG
         (long_long)
- #endif
- )
+ )
+#else
+ BOOST_SPIRIT_ENABLE_INTEGERS(
+ (short_)
+ (int_)
+ (long_)
+ )
+#endif
     //]
 }}
 
@@ -246,14 +252,20 @@
         BOOST_PP_SEQ_FOR_EACH(BOOST_SPIRIT_MAKE_INTEGER_PRIMITIVE, _, names) \
     /***/
 
+#ifdef BOOST_HAS_LONG_LONG
     BOOST_SPIRIT_MAKE_INTEGER_PRIMITIVES(
         ((short_) (short))
         ((int_) (int))
         ((long_) (long))
- #ifdef BOOST_HAS_LONG_LONG
         ((long_long) (boost::long_long_type))
- #endif
     )
+#else
+ BOOST_SPIRIT_MAKE_INTEGER_PRIMITIVES(
+ ((short_) (short))
+ ((int_) (int))
+ ((long_) (long))
+ )
+#endif
     //]
 }}}
 

Modified: trunk/boost/spirit/home/qi/numeric/uint.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/uint.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/uint.hpp 2010-12-30 21:58:40 EST (Thu, 30 Dec 2010)
@@ -45,6 +45,7 @@
         BOOST_PP_SEQ_FOR_EACH(BOOST_SPIRIT_ENABLE_UINTEGER, _, names) \
     /***/
 
+#ifdef BOOST_HAS_LONG_LONG
     BOOST_SPIRIT_ENABLE_UINTEGERS(
         (bin)
         (oct)
@@ -52,10 +53,18 @@
         (ushort_)
         (uint_)
         (ulong_)
- #ifdef BOOST_HAS_LONG_LONG
         (ulong_long)
- #endif
- )
+ )
+#else
+ BOOST_SPIRIT_ENABLE_UINTEGERS(
+ (bin)
+ (oct)
+ (hex)
+ (ushort_)
+ (uint_)
+ (ulong_)
+ )
+#endif
 }}
 
 namespace boost { namespace spirit { namespace qi
@@ -250,6 +259,7 @@
         BOOST_PP_SEQ_FOR_EACH(BOOST_SPIRIT_MAKE_UINTEGER_PRIMITIVE, _, names) \
     /***/
 
+#ifdef BOOST_HAS_LONG_LONG
     BOOST_SPIRIT_MAKE_UINTEGER_PRIMITIVES(
         ((bin) (unsigned) (2))
         ((oct) (unsigned) (8))
@@ -257,10 +267,18 @@
         ((ushort_) (unsigned short) (10))
         ((uint_) (unsigned int) (10))
         ((ulong_) (unsigned long) (10))
- #ifdef BOOST_HAS_LONG_LONG
         ((ulong_long) (boost::ulong_long_type) (10))
- #endif
     )
+#else
+ BOOST_SPIRIT_MAKE_UINTEGER_PRIMITIVES(
+ ((bin) (unsigned) (2))
+ ((oct) (unsigned) (8))
+ ((hex) (unsigned) (16))
+ ((ushort_) (unsigned short) (10))
+ ((uint_) (unsigned int) (10))
+ ((ulong_) (unsigned long) (10))
+ )
+#endif
 }}}
 
 #endif


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