Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84768 - trunk/boost/chrono/io
From: vicente.botet_at_[hidden]
Date: 2013-06-14 01:35:24


Author: viboes
Date: 2013-06-14 01:35:23 EDT (Fri, 14 Jun 2013)
New Revision: 84768
URL: http://svn.boost.org/trac/boost/changeset/84768

Log:
Chrono: Apply patch for #8691.

Text files modified:
   trunk/boost/chrono/io/duration_get.hpp | 15 ++++++++++-----
   1 files changed, 10 insertions(+), 5 deletions(-)

Modified: trunk/boost/chrono/io/duration_get.hpp
==============================================================================
--- trunk/boost/chrono/io/duration_get.hpp Fri Jun 14 01:14:48 2013 (r84767)
+++ trunk/boost/chrono/io/duration_get.hpp 2013-06-14 01:35:23 EDT (Fri, 14 Jun 2013) (r84768)
@@ -467,7 +467,7 @@
        * translation in other contexts, as e.g. days and weeks.
        *
        * @param facet the duration_units facet
- * @param s start input stream iterator.
+ * @param i start input stream iterator.
        * @param e end input stream iterator.
        * @param ios a reference to a ios_base.
        * @param err the ios_base state.
@@ -484,11 +484,14 @@
         const string_type* k = chrono_detail::scan_keyword(i, e, units, units_end,
         //~ std::use_facet<std::ctype<CharT> >(loc),
             err);
+ if (err & (std::ios_base::badbit | std::ios_base::failbit))
+ {
+ return i;
+ }
         if (!facet.match_n_d_valid_unit(k))
         {
           err |= std::ios_base::failbit;
         }
-
         return i;
       }
 
@@ -499,7 +502,7 @@
        * translation in other contexts, as e.g. days and weeks.
        *
        * @param facet the duration_units facet
- * @param s start input stream iterator.
+ * @param i start input stream iterator.
        * @param e end input stream iterator.
        * @param ios a reference to a ios_base.
        * @param err the ios_base state.
@@ -519,13 +522,15 @@
         const string_type* k = chrono_detail::scan_keyword(i, e, units, units_end,
         //~ std::use_facet<std::ctype<CharT> >(loc),
             err);
-
+ if (err & (std::ios_base::badbit | std::ios_base::failbit))
+ {
+ return i;
+ }
         if (!facet.match_valid_unit(k, rt))
         {
           err |= std::ios_base::failbit;
         }
         return i;
-
       }
     };
 


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