2003-11-23 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (_M_extract_float,
_M_extract_int): Remove a wrong comment and simplify
the corresponding code using char_traits::find().
From-SVN: r73853
2003-11-22 Paolo Carlini <pcarlini@suse.de>
* include/bits/istream.tcc (getline(basic_string<>&)):
Fix error in comment of the previous commit.
From-SVN: r73836
2003-11-22 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12593
* include/bits/istream.tcc (operator>>(basic_string<>&),
getline(basic_string<>&)): Implement resolution of DR 91 [WP];
fix some minor issues with the exit conditions.
* docs/html/ext/howto.html: Add an entry for DR 91.
From-SVN: r73835
2003-11-20 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/11602
* config/locale/gnu/codecvt_members.cc (codecvt::do_out):
Rewrite, using both wcsnrtombs and wcrtomb in a loop: the
former is very fast, but stops if encounters a NUL.
* testsuite/performance/wchar_t_out.cc: New, from the PR.
From-SVN: r73769
2003-11-19 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/codecvt_members.cc (do_out): If
we can upper bound the total number of external chars
to something smaller than __to_end - __to, avoid the
temporary buffer, the memcopy and simplify the loop.
* config/locale/generic/codecvt_members.cc (do_out):
Likewise.
From-SVN: r73733
2003-11-18 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12868
* include/bits/fstream.tcc (imbue): For encodings != -1 it's
always ok to imbue a new locale, provided seekoff(0, cur, ...)
doesn't fail, of course.
(underflow): In order for the above to work, deal gracefully
with _M_codecvt->in returning codecvt_base::error while
(__ilen = __iend - this->eback()) > 0: it just means __ilen
correctly converted internal characters before an error.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: New.
From-SVN: r73697
2003-11-14 Paolo Carlini <pcarlini@suse.de>
* docs/html/ext/howto.html: Add entries for DR 63, 75
and 305; tweak entries for DR 60 and 328.
From-SVN: r73591
2003-11-13 Douglas Gregor <gregod@cs.rpi.edu>
* docs/html/debug.html: Users are allowed to specialize in
namespace __gnu_debug, unlike in the Apple version of the debug
mode. Clear up a confusing double-negative. Note that
std::basic_string does provide extra debugging capabilities, but
not safe iterators.
* include/bits/basic_string.tcc: Make sure there's never an
ambiguity when calling __is_null_pointer.
* include/debug/deque: (deque::erase) Properly handle invalidation
when erasing at the end of the deque.
* include/debug/vector: (vector::swap): Swap _M_guaranteed_capacity.
(vector::clear): Set the guaranteed capacity to 0.
* testsuite/23_containers/deque/invalidation/4.cc: (test04): Test
iterator invalidation when erasing at the end of the deque.
From-SVN: r73564
2003-11-13 Petur Runolfsson <peturr02@ru.is>
PR libstdc++/12594
* include/bits/ostream.tcc
(basic_ostream::operator<<(basic_ostream& (*)(basic_ostream&)),
basic_ostream::operator<<(basic_ios& (*)(basic_ios&)),
basic_ostream::operator<<(ios_base& (*)(ios_base&))):
Implement the resolution of DR 60 (TC): These are not formatted
output functions so don't construct sentry objects and don't
catch exceptions.
(basic_ostream::put, basic_ostream::write): Implement the
resolution of DR 63 (TC) by catching exceptions and setting
badbit.
(basic_ostream::flush): Implement the resolution of DR 60 (TC):
This is not an unformatted output function so don't construct
a sentry object.
* testsuite/testsuite_io.h (sync_streambuf): Define.
* testsuite/27_io/basic_ostream/flush/char/2.cc: New test.
* testsuite/27_io/basic_ostream/inserters_other/char/5.cc: New test.
* testsuite/27_io/basic_ostream/put/char/1.cc: New test.
* testsuite/27_io/basic_ostream/write/char/1.cc: New test.
From-SVN: r73551
2003-11-13 Paolo Carlini <pcarlini@suse.de>
* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1:
Fix, closely following the testcase included in the PR.
* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2: Ditto.
* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3: Ditto.
* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4: Ditto.
From-SVN: r73548
PR libstdc++/12947
* bits/demangle.h
(_GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS): Added.
(_GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME): Added.
(session<Allocator>::next_peek() const): Added.
(decode_non_negative_decimal_integer(string_type&)):
Renamed from decode_decimal_integer(string_type&).
(session<Allocator>::decode_nested_name):
Decode <template_param> as well.
(session<Allocator>::add_substitution):
Handle <template-param> for <nested-name>'s.
(enum xary_nt): Added.
(struct entry_st): Added member `xary_nt type' instead of `bool unary'.
(symbol_name_table_c): Updated for `entry_st::type' and additional
operators (unary `operator+' and `sizeof(type)').
(offset_table_c): Updated for new operators (causing a new hash map).
(decode_operator_name): Match the updated hash map.
(session<Allocator>::decode_expression):
Support for `sizeof ([typename] type)' (st),
dependent names (sr) and casting operator (cv). Handle
`entry_st::type'. Handle _GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS
and _GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME.
(session<Allocator>::decode_type_with_postfix):
Support `extern "C"' function types (FY).
* testsuite/demangle/regression/cw-16.cc: Added tests for the
added functionality.
* testsuite/demangle/regression/3111-2.cc: sizeof now has a space
appended.
From-SVN: r73480
2003-11-11 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12875
* include/bits/fstream.tcc (setbuf): Don't do anything
after open(), in particular don't discard data.
(_M_allocate_internal_buffer): Tweak to not allocate memory
in case the buffer is provided by the user via setbuf.
* include/ext/stdio_filebuf.h: Tweak comment.
* testsuite/27_io/basic_filebuf/setbuf/char/12875-1.cc: New.
* testsuite/27_io/basic_filebuf/setbuf/char/12875-2.cc: Likewise.
* testsuite/27_io/basic_filebuf/setbuf/char/2.cc: Tweak, now
setbuf does nothing after open().
* testsuite/27_io/basic_filebuf/setbuf/char/3.cc: Likewise.
From-SVN: r73477
2003-11-09 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (_M_insert_int,
_M_insert_float): Move a couple of vars inside an if block.
From-SVN: r73395
2003-11-09 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12971
* include/bits/locale_facets.tcc
(money_put::do_put(..., long double)): Fix conversion
specification as per DR 328 [WP].
* testsuite/22_locale/money_put/put/char/12971.cc: Add.
* testsuite/22_locale/money_put/put/wchar_t/12971.cc: Ditto.
* docs/html/ext/howto.html: Add entry for DR 328.
From-SVN: r73389
2003-11-08 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12967
* include/bits/list.tcc (merge): Implement resolution of
DR 300 [WP].
* docs/html/ext/howto.html: Add entry for DR 300; tweak entry
for DR 231.
* docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
Import R27.
From-SVN: r73377