Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56051 - in trunk/boost/spirit/home/qi/numeric: . detail
From: joel_at_[hidden]
Date: 2009-09-05 10:59:38


Author: djowel
Date: 2009-09-05 10:59:37 EDT (Sat, 05 Sep 2009)
New Revision: 56051
URL: http://svn.boost.org/trac/boost/changeset/56051

Log:
fixed broken code
Text files modified:
   trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp | 8 ++++----
   trunk/boost/spirit/home/qi/numeric/real_policies.hpp | 2 +-
   2 files changed, 5 insertions(+), 5 deletions(-)

Modified: trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp 2009-09-05 10:59:37 EDT (Sat, 05 Sep 2009)
@@ -163,7 +163,7 @@
         static void add(T& n, Char ch, mpl::false_) // unchecked add
         {
             const int digit = radix_traits<Radix>::digit(ch);
- n = n * Radix + digit;
+ n = n * T(Radix) + T(digit);
         }
 
         template <typename T, typename Char>
@@ -194,7 +194,7 @@
         static void add(T& n, Char ch, mpl::false_) // unchecked subtract
         {
             const int digit = radix_traits<Radix>::digit(ch);
- n = n * Radix - digit;
+ n = n * T(Radix) - T(digit);
         }
 
         template <typename T, typename Char>
@@ -349,7 +349,7 @@
                 }
             }
 
- Attribute val = Accumulate ? attr : 0;
+ Attribute val = Accumulate ? attr : Attribute(0);
             std::size_t count = 0;
             char_type ch;
 
@@ -450,7 +450,7 @@
                 }
             }
 
- Attribute val = Accumulate ? attr : 0;
+ Attribute val = Accumulate ? attr : Attribute(0);
             char_type ch = *it;
 
             if (!radix_check::is_valid(ch) || !extractor::call(ch, 0, val))

Modified: trunk/boost/spirit/home/qi/numeric/real_policies.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/real_policies.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/real_policies.hpp 2009-09-05 10:59:37 EDT (Sat, 05 Sep 2009)
@@ -92,7 +92,7 @@
         // starting with a non-digit character (such as NaN, Inf, QNaN etc.).
         //
         // The second call allows to recognize representation formats starting
- // with a 1.0 (such as 1.0#QNAN or 1.0#INF etc.).
+ // with a 1.0 (such as 1.0#NAN or 1.0#INF etc.).
         //
         // The functions should return true if a Nan or Inf has been found. In
         // this case the attr should be set to the matched value (NaN or


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