Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58108 - trunk/boost/spirit/home/karma/numeric/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-12-02 22:19:42


Author: hkaiser
Date: 2009-12-02 22:19:41 EST (Wed, 02 Dec 2009)
New Revision: 58108
URL: http://svn.boost.org/trac/boost/changeset/58108

Log:
Spirit: fixing numeric generators for character types
Text files modified:
   trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp | 10 ++++++----
   1 files changed, 6 insertions(+), 4 deletions(-)

Modified: trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp 2009-12-02 22:19:41 EST (Wed, 02 Dec 2009)
@@ -73,21 +73,23 @@
             } \
         } \
     /**/
-#define BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED(type) \
+#define BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED(unsignedtype) \
         template <> \
- struct absolute_value_helper<type> \
+ struct absolute_value_helper<unsignedtype> \
         { \
- typedef type result_type; \
- static result_type call(type n) \
+ typedef unsignedtype result_type; \
+ static result_type call(unsignedtype n) \
             { \
                 return n; \
             } \
         } \
     /**/
 
+ BOOST_SPIRIT_ABSOLUTE_VALUE(char, unsigned char);
         BOOST_SPIRIT_ABSOLUTE_VALUE(short, unsigned short);
         BOOST_SPIRIT_ABSOLUTE_VALUE(int, unsigned int);
         BOOST_SPIRIT_ABSOLUTE_VALUE(long, unsigned long);
+ BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED(unsigned char);
         BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED(unsigned short);
         BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED(unsigned int);
         BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED(unsigned long);


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