Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56526 - trunk/boost/spirit/home/qi/numeric/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-02 15:16:52


Author: hkaiser
Date: 2009-10-02 15:16:51 EDT (Fri, 02 Oct 2009)
New Revision: 56526
URL: http://svn.boost.org/trac/boost/changeset/56526

Log:
Spirit: fixed a problem in Qi real_impl, now uses assign_to customization point
Text files modified:
   trunk/boost/spirit/home/qi/numeric/detail/real_impl.hpp | 15 ++++++++-------
   1 files changed, 8 insertions(+), 7 deletions(-)

Modified: trunk/boost/spirit/home/qi/numeric/detail/real_impl.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/detail/real_impl.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/detail/real_impl.hpp 2009-10-02 15:16:51 EDT (Fri, 02 Oct 2009)
@@ -17,6 +17,7 @@
 #include <limits>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/spirit/home/support/unused.hpp>
+#include <boost/spirit/home/support/attributes.hpp>
 #include <boost/spirit/home/support/detail/pow10.hpp>
 #include <boost/spirit/home/support/detail/sign.hpp>
 #include <boost/assert.hpp>
@@ -149,11 +150,11 @@
             if (!got_a_number)
             {
                 // Check whether the number to parse is a NaN or Inf
- if (p.parse_nan(first, last, attr) ||
- p.parse_inf(first, last, attr))
+ if (p.parse_nan(first, last, n) ||
+ p.parse_inf(first, last, n))
                 {
                     // If we got a negative sign, negate the number
- attr = traits::negate(neg, attr);
+ traits::assign_to(traits::negate(neg, n), attr);
                     return true; // got a NaN or Inf, return early
                 }
 
@@ -244,17 +245,17 @@
                 // styles some implementations use for representing NaN or Inf.
 
                 // Check whether the number to parse is a NaN or Inf
- if (p.parse_nan(first, last, attr) ||
- p.parse_inf(first, last, attr))
+ if (p.parse_nan(first, last, n) ||
+ p.parse_inf(first, last, n))
                 {
                     // If we got a negative sign, negate the number
- attr = traits::negate(neg, attr);
+ traits::assign_to(traits::negate(neg, n), attr);
                     return true; // got a NaN or Inf, return immediately
                 }
             }
 
             // If we got a negative sign, negate the number
- attr = traits::negate(neg, n);
+ traits::assign_to(traits::negate(neg, n), attr);
 
             // Success!!!
             return true;


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