aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2004-11-18 13:38:09 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2004-11-18 13:38:09 +0000
commit899671904c2a76e4af6ed6aa578e6d660d0abd86 (patch)
treecae5725d4e270da043090baffb091ed37a26f6d0
parent0777d852b3d7b1cb68b63a6c56db0c235e51f883 (diff)
downloadgcc-899671904c2a76e4af6ed6aa578e6d660d0abd86.zip
gcc-899671904c2a76e4af6ed6aa578e6d660d0abd86.tar.gz
gcc-899671904c2a76e4af6ed6aa578e6d660d0abd86.tar.bz2
locale_facets.tcc (num_get<>::do_get(void*&)): If the failbit is set, don't set it again.
2004-11-18 Paolo Carlini <pcarlini@suse.de> * include/bits/locale_facets.tcc (num_get<>::do_get(void*&)): If the failbit is set, don't set it again. (money_get<>::_M_extract): Minor stylistic tweak: consistently with the other functions, take care of eofbit at the end. From-SVN: r90861
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc9
2 files changed, 10 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 370044a..09e20fc 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,12 @@
2004-11-18 Paolo Carlini <pcarlini@suse.de>
+ * include/bits/locale_facets.tcc (num_get<>::do_get(void*&)):
+ If the failbit is set, don't set it again.
+ (money_get<>::_M_extract): Minor stylistic tweak: consistently
+ with the other functions, take care of eofbit at the end.
+
+2004-11-18 Paolo Carlini <pcarlini@suse.de>
+
DR 434. bitset::to_string() hard to use [Ready]
* include/std/std_bitset.h (to_string): Add three overloads, taking
fewer template arguments.
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index 8216978..b503c95 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -825,8 +825,6 @@ namespace std
if (!(__err & ios_base::failbit))
__v = reinterpret_cast<void*>(__ul);
- else
- __err |= ios_base::failbit;
return __beg;
}
@@ -1481,16 +1479,15 @@ namespace std
__testvalid = false;
}
- // Iff no more characters are available.
- if (__beg == __end)
- __err |= ios_base::eofbit;
-
// Iff valid sequence is not recognized.
if (!__testvalid)
__err |= ios_base::failbit;
else
__units.swap(__res);
+ // Iff no more characters are available.
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
return __beg;
}