Paolo Carlini
acbab5bf1c
basic_string.h (c_str()): Simplify, due to 21.3.4 the internal representation is always kept null-terminated.
...
2004-01-18 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (c_str()): Simplify, due to
21.3.4 the internal representation is always kept null-terminated.
* include/bits/basic_string.tcc (_M_clone): Null-terminate.
* testsuite/21_strings/basic_string/element_access/char/4.cc: New.
* testsuite/21_strings/basic_string/element_access/wchar_t/4.cc: Ditto.
From-SVN: r76092
2004-01-18 10:51:13 +00:00
Paolo Carlini
95c9624ff5
re PR libstdc++/13650 (string::compare should not (always) use traits_type::length())
...
2004-01-13 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13650
* include/bits/basic_string.tcc (compare(size_type, size_type,
const _CharT*, size_type)): Implement correctly the resolution
of DR 5: basically, s is a char array, -not- a C string.
* include/bits/basic_string.h: Tweak some comments.
* testsuite/21_strings/basic_string/compare/char/13650.cc: New.
* testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.
From-SVN: r75798
2004-01-13 11:12:38 +00:00
Neil Ferguson
cbc6795585
basic_string.tcc (reserve): Allow shrink-to-fit.
...
2003-12-11 Neil Ferguson <nferguso@eso.org>
Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.tcc (reserve): Allow shrink-to-fit.
* testsuite/21_strings/basic_string/capacity/1.cc: Tweak.
* testsuite/21_strings/basic_string/capacity/char/1.cc: Ditto.
* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Ditto.
Co-Authored-By: Paolo Carlini <pcarlini@suse.de>
From-SVN: r74551
2003-12-11 22:29:12 +00:00
Benjamin Kosnik
9540958eff
re PR libstdc++/10081 (basic_ios::_M_cache_locale leaves NULL members in the face of unknown locales)
...
2003-10-20 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/10081
* testsuite_hooks.h: Add pod_type, ctype and numpunct specializations.
* testsuite_hooks.cc: Same.
* 22_locale/numpunct/members/pod/1.cc: Edit.
* 22_locale/numpunct/members/pod/2.cc: Same.
* 27_io/basic_istream/sentry/char/3983-fstream.cc: Move ...
* 27_io/basic_istream/sentry/char/3983-sstream.cc: Move ...
* 27_io/basic_istream/extractors_arithmetic/pod/3983-1.cc: Here.
* 27_io/basic_istream/extractors_character/pod/3983-2.cc: Here.
* 27_io/basic_istream/extractors_other/pod/3983-3.cc: Here.
* 27_io/basic_ostream/sentry/char/3983-fstream.cc: Remove.
* 27_io/basic_ostream/sentry/char/3983-sstream.cc: Remove.
* 27_io/basic_istream/sentry/pod/1.cc: New.
* 27_io/basic_ostream/sentry/pod/1.cc: New.
* 21_strings/basic_string/inserters_extractors/pod/10081-in.cc: New.
* 21_strings/basic_string/inserters_extractors/pod/10081-out.cc: New.
From-SVN: r72728
2003-10-20 22:11:40 +00:00
Benjamin Kosnik
11f10e6b1f
locale_facets.tcc: Tweak to avoid warnings.
...
2003-09-23 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_facets.tcc: Tweak to avoid warnings.
* testsuite/testsuite_hooks.h: Same.
* testsuite/*/*.cc: Same.
From-SVN: r71693
2003-09-23 20:03:30 +00:00
Benjamin Kosnik
cb584bcf98
testsuite_hooks.h: Remove list include.
...
2003-07-28 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/testsuite_hooks.h: Remove list include.
(func_callback): Define as unique type, not std::list.
Change DEBUG_ASSERT to _GLIBCXX_ASSERT.
* testsuite/libstdc++-v3.dg/dg.exp: Same.
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Same.
* testsuite/23_containers/bitset_ctor.cc:
* testsuite/17_intro/header_ciso646.cc: Remove DEBUG_ASSERT.
* testsuite/18_support/numeric_limits.cc: Same.
* testsuite/21_strings/basic_string/append/char/1.cc: Same.
* testsuite/21_strings/basic_string/append/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/compare/char/1.cc: Same.
* testsuite/21_strings/basic_string/compare/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/element_access/char/1.cc: Same.
* testsuite/21_strings/basic_string/element_access/char/2.cc: Same.
* testsuite/21_strings/basic_string/element_access/char/3.cc: Same.
* testsuite/21_strings/basic_string/element_access/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/element_access/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/element_access/wchar_t/3.cc: Same.
* testsuite/21_strings/basic_string/find/char/1.cc: Same.
* testsuite/21_strings/basic_string/find/char/2.cc: Same.
* testsuite/21_strings/basic_string/find/char/3.cc: Same.
* testsuite/21_strings/basic_string/find/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/find/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/find/wchar_t/3.cc: Same.
* testsuite/21_strings/basic_string/insert/char/1.cc: Same.
* testsuite/21_strings/basic_string/insert/char/2.cc: Same.
* testsuite/21_strings/basic_string/insert/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/insert/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/inserters_extractors/char/1.cc:
* testsuite/21_strings/basic_string/inserters_extractors/char/4.cc:
* testsuite/21_strings/basic_string/inserters_extractors/char/5.cc:
* testsuite/21_strings/basic_string/inserters_extractors/char/6.cc:
* testsuite/21_strings/basic_string/inserters_extractors/char/7.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc:
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc:
* testsuite/21_strings/basic_string/operators/char/1.cc: Same.
* testsuite/21_strings/basic_string/operators/char/2.cc: Same.
* testsuite/21_strings/basic_string/operators/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/operators/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/replace/char/1.cc: Same.
* testsuite/21_strings/basic_string/replace/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/rfind/char/1.cc: Same.
* testsuite/21_strings/basic_string/rfind/char/2.cc: Same.
* testsuite/21_strings/basic_string/rfind/char/3.cc: Same.
* testsuite/21_strings/basic_string/rfind/wchar_t/1.cc: Same.
* testsuite/21_strings/basic_string/rfind/wchar_t/2.cc: Same.
* testsuite/21_strings/basic_string/rfind/wchar_t/3.cc: Same.
* testsuite/21_strings/basic_string/substr/char/1.cc: Same.
* testsuite/21_strings/basic_string/substr/wchar_t/1.cc: Same.
* testsuite/23_containers/bitset_ctor.cc: Same.
* testsuite/23_containers/bitset_shift.cc: Same.
* testsuite/23_containers/vector_ctor.cc: Same.
* testsuite/23_containers/vector_element_access.cc: Same.
* testsuite/24_iterators/istreambuf_iterator.cc: Same.
* testsuite/24_iterators/iterator.cc: Same.
* testsuite/24_iterators/ostreambuf_iterator.cc: Same.
* testsuite/25_algorithms/lower_bound.cc: Same.
* testsuite/26_numerics/complex_inserters_extractors.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc: Same.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc: Same.
* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
Same.
From-SVN: r69892
2003-07-28 17:12:16 +00:00
Matt Austern
d5ff4e3f11
char_traits.h (class char_traits): Put all the real work into the new class template __gnu_cxx::char_traits.
...
* /include/bits/char_traits.h (class char_traits): Put all the
real work into the new class template __gnu_cxx::char_traits.
Gave generic definitions for member functions. Types are taken
from the new class template __gnu_cxx::_Char_types.
* testsuite/21_strings/char_traits/requirements/short/1.cc: New
file. Test of std::char_traits<short>, which serves as a test of
the char_traits primary template.
From-SVN: r69772
2003-07-25 05:32:23 +00:00
Benjamin Kosnik
aecf642c78
*: Change __gnu_cxx_test to __gnu_test.
...
2003-07-24 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/*: Change __gnu_cxx_test to __gnu_test.
From-SVN: r69761
2003-07-24 21:08:03 +00:00
Doug Gregor
8dbe14becf
Testsuite corrections
...
From-SVN: r68288
2003-06-20 23:40:11 +00:00
Doug Gregor
bdb0f0f5d2
fix basic_string::replace for integral types
...
From-SVN: r68286
2003-06-20 22:12:18 +00:00
Paolo Carlini
85819f7c33
3.cc: New file, testing basic_string<char>::find_first_not_of.
...
2003-05-04 Paolo Carlini <pcarlini@unitus.it>
* testsuite/21_strings/basic_string/find/char/3.cc: New
file, testing basic_string<char>::find_first_not_of.
* testsuite/21_strings/basic_string/find/wchar_t/3.cc:
Likewise for basic_string<wchar_t>.
From-SVN: r66466
2003-05-04 22:12:18 +00:00
Paolo Carlini
eea5120f82
1.cc: Remove find_first_of, find_last_of and find_last_not_of tests.
...
2003-03-24 Paolo Carlini <pcarlini@unitus.it>
* testsuite/21_strings/basic_string/find/char/1.cc: Remove
find_first_of, find_last_of and find_last_not_of tests.
* testsuite/21_strings/basic_string/find/char/2.cc: find_first_of
tests here, new file.
* testsuite/21_strings/basic_string/find/wchar_t/1.cc: Likewise, remove
wchar_t find_first_of, find_last_of and find_last_not_of tests.
* testsuite/21_strings/basic_string/find/wchar_t/2.cc: Likewise,
wchar_t find_first_of tests here, new file.
* testsuite/21_strings/basic_string/rfind/char/2.cc: find_last_of tests
here.
* testsuite/21_strings/basic_string/rfind/char/3.cc: find_last_not_of
tests here.
* testsuite/21_strings/basic_string/rfind/wchar_t/2.cc: likewise,
wchar_t find_last_of tests here.
* testsuite/21_strings/basic_string/rfind/wchar_t/3.cc: likewise,
wchar_t find_last_not_of tests here.
From-SVN: r64824
2003-03-24 22:22:40 +00:00
Paolo Carlini
38b2a9713f
1.cc: Test char not wchar_t.
...
2003-03-19 Paolo Carlini <pcarlini@unitus.it>
* testsuite/21_strings/char_traits/requirements/char/1.cc:
Test char not wchar_t.
From-SVN: r64576
2003-03-19 12:17:49 +00:00
Paolo Carlini
91d167bb61
1.cc: Correct length, taking into account sizeof(wchar_t).
...
2003-03-18 Paolo Carlini <pcarlini@unitus.it>
* testsuite/21_strings/basic_string/append/wchar_t/1.cc:
Correct length, taking into account sizeof(wchar_t).
From-SVN: r64547
2003-03-18 19:16:50 +00:00
Paolo Carlini
61f1ed592c
Reshuffle 21_strings testsuite.
...
2003-03-18 Paolo Carlini <pcarlini@unitus.it>
Reshuffle 21_strings testsuite.
* testsuite/21_strings/append.cc, c_strings.cc, invariants.cc,
assign.cc, ctor_copy_dtor.cc, nonmember.cc, capacity.cc,
element_access.cc, operations.cc, char_traits_requirements.cc,
find.cc, replace.cc, char_traits_typedefs.cc, insert.cc, rfind.cc,
compare.cc, inserters_extractors.cc, substr.cc: Split up, add
wchar_t tests as follows.
* 21_strings/basic_string/append/char/1.cc: New.
* 21_strings/basic_string/append/wchar_t/1.cc: New.
* 21_strings/basic_string/assign/char/1.cc: New.
* 21_strings/basic_string/assign/char/2.cc: New.
* 21_strings/basic_string/assign/char/3.cc: New.
* 21_strings/basic_string/assign/wchar_t/1.cc: New.
* 21_strings/basic_string/assign/wchar_t/2.cc: New.
* 21_strings/basic_string/assign/wchar_t/3.cc: New.
* 21_strings/basic_string/capacity/1.cc: New.
* 21_strings/basic_string/capacity/char/1.cc: New.
* 21_strings/basic_string/capacity/char/2.cc: New.
* 21_strings/basic_string/capacity/wchar_t/1.cc: New.
* 21_strings/basic_string/capacity/wchar_t/2.cc: New.
* 21_strings/basic_string/compare/char/1.cc: New.
* 21_strings/basic_string/compare/wchar_t/1.cc: New.
* 21_strings/basic_string/cons/char/1.cc: New.
* 21_strings/basic_string/cons/char/2.cc: New.
* 21_strings/basic_string/cons/char/3.cc: New.
* 21_strings/basic_string/cons/char/4.cc: New.
* 21_strings/basic_string/cons/char/5.cc: New.
* 21_strings/basic_string/cons/wchar_t/1.cc: New.
* 21_strings/basic_string/cons/wchar_t/2.cc: New.
* 21_strings/basic_string/cons/wchar_t/3.cc: New.
* 21_strings/basic_string/cons/wchar_t/4.cc: New.
* 21_strings/basic_string/cons/wchar_t/5.cc: New.
* 21_strings/basic_string/element_access/char/1.cc: New.
* 21_strings/basic_string/element_access/char/2.cc: New.
* 21_strings/basic_string/element_access/char/3.cc: New.
* 21_strings/basic_string/element_access/wchar_t/1.cc: New.
* 21_strings/basic_string/element_access/wchar_t/2.cc: New.
* 21_strings/basic_string/element_access/wchar_t/3.cc: New.
* 21_strings/basic_string/find/char/1.cc: New.
* 21_strings/basic_string/find/wchar_t/1.cc: New.
* 21_strings/basic_string/insert/char/1.cc: New.
* 21_strings/basic_string/insert/char/2.cc: New.
* 21_strings/basic_string/insert/wchar_t/1.cc: New.
* 21_strings/basic_string/insert/wchar_t/2.cc: New.
* 21_strings/basic_string/inserters_extractors/char/1.cc: New.
* 21_strings/basic_string/inserters_extractors/char/4.cc: New.
* 21_strings/basic_string/inserters_extractors/char/5.cc: New.
* 21_strings/basic_string/inserters_extractors/char/6.cc: New.
* 21_strings/basic_string/inserters_extractors/char/7.cc: New.
* 21_strings/basic_string/inserters_extractors/char/8.cc: New.
* 21_strings/basic_string/inserters_extractors/char/9.cc: New.
* 21_strings/basic_string/inserters_extractors/wchar_t/1.cc: New.
* 21_strings/basic_string/inserters_extractors/wchar_t/4.cc: New.
* 21_strings/basic_string/inserters_extractors/wchar_t/5.cc: New.
* 21_strings/basic_string/inserters_extractors/wchar_t/6.cc: New.
* 21_strings/basic_string/inserters_extractors/wchar_t/7.cc: New.
* 21_strings/basic_string/inserters_extractors/wchar_t/8.cc: New.
* 21_strings/basic_string/inserters_extractors/wchar_t/9.cc: New.
* 21_strings/basic_string/operators/char/1.cc: New.
* 21_strings/basic_string/operators/char/2.cc: New.
* 21_strings/basic_string/operators/wchar_t/1.cc: New.
* 21_strings/basic_string/operators/wchar_t/2.cc: New.
* 21_strings/basic_string/replace/char/1.cc: New.
* 21_strings/basic_string/replace/char/2.cc: New.
* 21_strings/basic_string/replace/char/3.cc: New.
* 21_strings/basic_string/replace/char/4.cc: New.
* 21_strings/basic_string/replace/char/5.cc: New.
* 21_strings/basic_string/replace/wchar_t/1.cc: New.
* 21_strings/basic_string/replace/wchar_t/2.cc: New.
* 21_strings/basic_string/replace/wchar_t/3.cc: New.
* 21_strings/basic_string/replace/wchar_t/4.cc: New.
* 21_strings/basic_string/replace/wchar_t/5.cc: New.
* 21_strings/basic_string/rfind/char/1.cc: New.
* 21_strings/basic_string/rfind/char/2.cc: New.
* 21_strings/basic_string/rfind/char/3.cc: New.
* 21_strings/basic_string/rfind/wchar_t/1.cc: New.
* 21_strings/basic_string/rfind/wchar_t/2.cc: New.
* 21_strings/basic_string/rfind/wchar_t/3.cc: New.
* 21_strings/basic_string/substr/char/1.cc: New.
* 21_strings/basic_string/substr/wchar_t/1.cc: New.
* 21_strings/c_strings/char/1.cc: New.
* 21_strings/c_strings/char/2.cc: New.
* 21_strings/c_strings/wchar_t/1.cc: New.
* 21_strings/c_strings/wchar_t/2.cc: New.
* 21_strings/char_traits/requirements/char/1.cc: New.
* 21_strings/char_traits/requirements/wchar_t/1.cc: New.
* 21_strings/char_traits/typedefs/char/1.cc: New.
From-SVN: r64524
2003-03-18 05:04:14 +00:00
Benjamin Kosnik
8d59b23018
Renames, namespaces for testsuite utilities.
...
2003-01-12 Benjamin Kosnik <bkoz@redhat.com>
Renames, namespaces for testsuite utilities.
* testsuite/testsuite_hooks.h: Put into namespace __gnu_cxx_test.
(gnu_allocator_tracker): Rename to allocation_tracker.
(gnu_new_allocator): Rename to tracker_alloc.
(__set_testsuite_memlimit): Rename to set_memory_limits.
(gnu_assignment_operator): Rename to assignment_operator.
(gnu_destructor): Rename to destructor.
(gnu_copy_tracker): Rename to copy_tracker.
(gnu_char, gnu_int, gnu_long): Rename to pod_char, pod_int, pod_long.
(run_tests_wrapped_locale): New.
(run_tests_wrapped_env): New.
* testsuite/testsuite_hooks.cc: Same.
(class locale_data): Add.
(class enviornment_variable): Add.
(class not_found): Add.
* testsuite/testsuite_allocator.h: Same.
* testsuite/testsuite_allocator.cc: Same.
* testsuite/23_containers/deque_ctor.cc
(test_copy_ctor_exception_safety): Change gnu_allocator_tracker to
allocation_tracker.
Change gnu_new_allocator to tracker_alloc.
Change gnu_counting_struct to counter.
Change gnu_copy_tracker to copy_tracker.
Change gnu_copy_constructor to copy_constructor.
Change gnu_assignment_operator to assignment_operator.
Inject.
* testsuite/23_containers/vector_capacity.cc: Same.
* testsuite/23_containers/vector_ctor.cc (test01): Same.
* testsuite/23_containers/list_modifiers.cc: Change
gnu_copy_tracker to copy_tracker.
* testsuite/21_strings/ctor_copy_dtor.cc (main): Change
__set_testsuite_memlimit to set_memory_limits.
* testsuite/21_strings/insert.cc (main): Same.
* testsuite/27_io/filebuf.cc: Change gnu_char to pod_char.
* testsuite/27_io/stringstream.cc: Same.
* testsuite/27_io/stringbuf.cc: Same.
* testsuite/27_io/streambuf.cc: Same.
* testsuite/27_io/ostream.cc: Same.
* testsuite/27_io/istream.cc: Same.
* testsuite/27_io/fstream.cc: Same.
* testsuite/lib/libstdc++-v3-dg.exp
(libstdc++-v3-list-sourcefiles): Additionally handle files two and
three levels deeper in glob patterns.
From-SVN: r61261
2003-01-14 04:56:56 +00:00
Phil Edwards
ccb128db7a
re PR libstdc++/8716 (std::string( NULL, 0 ) throws exception also on zero length)
...
2002-11-28 Phil Edwards <pme@gcc.gnu.org>
PR libstdc++/8716
* testsuite/21_strings/ctor_copy_dtor.cc (test05): Also test
the NULL-pointer, zero-size case.
From-SVN: r59616
2002-11-28 21:28:20 +00:00
Paolo Carlini
085825b83b
re PR libstdc++/8347 (empty vector range used in string construction causes core dump.)
...
2002-10-27 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/8347
* include/bits/basic_string.tcc
(string::_S_construct(_InIter, _InIter, const _Alloc&,
forward_iterator_tag)): Do not throw logic error if
__beg == NULL && __end == __beg.
(string::string(const _CharT*, const _Alloc&)): Tweak.
* testsuite/21_strings/ctor_copy_dtor.cc: Add test05 from PR.
From-SVN: r58577
2002-10-27 07:35:06 +00:00
Loren J. Rittle
0b564d905f
howto.html (GLIBCPP_FORCE_NEW): Document new environment variable which replaces all uses of __USE_MALLOC macro.
...
* docs/html/23_containers/howto.html (GLIBCPP_FORCE_NEW): Document
new environment variable which replaces all uses of __USE_MALLOC
macro.
* docs/html/ext/howto.html (GLIBCPP_FORCE_NEW): Likewise.
(__mem_interface): Remove all references to old internal typedef.
* include/backward/alloc.h (__USE_MALLOC): Remove it and all
guarded code.
* include/bits/c++config (__USE_MALLOC): Update related error
message and comment.
* include/bits/stl_alloc.h (__USE_MALLOC): Remove it and all
guarded code. Update all related comments.
(__mem_interface): Unconditionally replace it with __new_alloc.
However, leave the typedef around in case anyone used it.
(__default_alloc_template<>::_S_force_new): New class static.
(__default_alloc_template<>::allocate, deallocate): Add
run-time controlled feature similar to what __USE_MALLOC code
path had provided.
* src/stl-inst.cc (__USE_MALLOC): Remove it and all
guarded code.
* testsuite/21_strings/capacity.cc: Remove reference to __USE_MALLOC.
Add documentation on GLIBCPP_FORCE_NEW environment variable.
* testsuite/ext/allocators.cc: Likewise.
From-SVN: r58286
2002-10-18 20:52:57 +00:00
Benjamin Kosnik
f13a69eccf
char_traits.h: Remove generic definitions.
...
2002-07-30 Benjamin Kosnik <bkoz@redhat.com>
Gabriel Dos Reis <gdr@nerim.net>
* include/bits/char_traits.h: Remove generic definitions.
* include/bits/streambuf_iterator.h (istreambuf_iterator): Use
eof, not -2.
* include/bits/istream.tcc (istream::readsome): Don't check
against eof, instead use constants.
(istream::sync): Same.
(istream::sentry::sentry): Use eq_int_type.
(istream::get): Same.
* include/bits/ostream.tcc: Change __pad to
__pad<_CharT, _Traits>::_S_pad.
* include/bits/locale_facets.h: Add __pad_traits generic and
ostreambuf_iterator specialization.
* include/bits/locale_facets.tcc: Change __pad into struct __pad
with a _CharT and _Traits template parameter and _S_pad static
member function.
* src/locale-inst.cc: Update __pad instantiations.
* include/std/std_fstream.h: Declare _M_underflow_common
specializations.
* src/fstream.cc: New. Add _M_underflow_common specializations.
* include/bits/fstream.tcc (filebuf::close): Use traits_type.
(filebuf::_M_underflow_common(bool)): Remove generic version, as
sys_ungetc and custom int_types don't get along.
* include/std/std_streambuf.h: Add _M_pos.
* src/Makefile.am (sources): Add fstream.cc.
* src/Makefile.in: Regenerate.
* testsuite/21_strings/capacity.cc: Add char_traits specializations.
* testsuite/22_locale/codecvt_members_unicode_char.cc: Same.
* testsuite/22_locale/codecvt_members_unicode_wchar_t.cc: Same.
* testsuite/22_locale/ctor_copy_dtor.cc: Same.
* testsuite/27_io/filebuf_virtuals.cc (test07): Move to...
* testsuite/27_io/filebuf.cc: ...here.
* testsuite/testsuite_hooks.h: Add gnu_char, gnu_int, char_traits
specialization for both.
* testsuite/27_io/streambuf.cc: Add instantiation test,
testsuite_hooks include.
* testsuite/27_io/istream.cc: Same.
* testsuite/27_io/ostream.cc: Same.
* testsuite/27_io/fstream.cc: Same.
* testsuite/27_io/stringstream.cc: Same.
* testsuite/27_io/filebuf.cc: Same.
* testsuite/27_io/stringbuf.cc: Same.
Co-Authored-By: Gabriel Dos Reis <gdr@nerim.net>
From-SVN: r55893
2002-07-31 02:47:36 +00:00
Paolo Carlini
05261e700c
2002-06-04 Paolo Carlini <pcarlini@unitus.it>
...
Gaby Dos Reis <gdr@codesourcery.com>
* include/bits/basic_string.tcc
(basic_string::_S_construct(forward_iterator_tag):
Fix typo in null pointer check.
* testsuite/21_strings/ctor_copy_dtor.cc: Add test04.
Co-Authored-By: Gabriel Dos Reis <gdr@codesourcery.com>
From-SVN: r54255
2002-06-04 18:20:38 +00:00
Paolo Carlini
adf2e3e668
basic_string.h (replace(__pos, __n1, __s, __n2): Fix and tighten __throw_length_error check.
...
2002-04-26 Paolo Carlini <pcarlini@unitus.it>
* include/bits/basic_string.h (replace(__pos, __n1, __s, __n2):
Fix and tighten __throw_length_error check.
* testsuite/21_strings/replace.cc (test05): New.
* testsuite/21_strings/replace.cc (test02, test03, test04): Tweak.
From-SVN: r52797
2002-04-26 18:21:32 +00:00
Benjamin Kosnik
36ce7daa04
localefwd.h (locale: 🆔 :_M_id): Do this correctly, as type safety is important, especially on solaris.
...
2002-04-18 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/localefwd.h (locale:🆔 :_M_id): Do this correctly,
as type safety is important, especially on solaris.
* include/bits/istream.tcc (istream::read): Clean.
(istream::readsome): Same.
* locale.cc: Wrap lines.
* testsuite/21_strings/inserters_extractors.cc: Tweaks.
* testsuite/27_io/instantiations.cc (test): Add bool variable...
* testsuite/21_strings/capacity.cc: Clean.
From-SVN: r52501
2002-04-18 23:47:50 +00:00
Paolo Carlini
418bb88063
basic_string.h (replace(i1, i2, _CharT* k1, _CharT* k2), [...]): New specializations to optimize for the common cases of pointers and iterators.
...
2002-04-02 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers <ncm@cantrip.org>
Philip Martin <philip@codematters.co.uk>
* include/bits/basic_string.h
(replace(i1, i2, _CharT* k1, _CharT* k2),
replace(i2, i2, const _CharT* k1, const _CharT* k2),
replace(i1, i2, iterator k1, iterator k2,
replace(i1, i2, const_iterator k1, const_iterator k2):
New specializations to optimize for the common cases of
pointers and iterators.
(replace(pos, n1, s, n2)): Tweak.
* include/bits/basic_string.tcc: Tweak comments.
* testsuite/21_strings/replace.cc (test04): New tests.
Co-Authored-By: Nathan Myers <ncm@cantrip.org>
Co-Authored-By: Philip Martin <philip@codematters.co.uk>
From-SVN: r51746
2002-04-02 12:07:07 +00:00
Paolo Carlini
99b629fa30
2002-04-01 Paolo Carlini <pcarlini@unitus.it>
...
* config/locale/ieee_1003.1-2001/codecvt_specializations.h
(codecvt::do_out, codecvt::do_unshift, codecvt::do_in):
By definition, sizeof(char) == 1.
* include/bits/locale_facets.tcc (money_get::do_get,
money_put::do_put): Ditto.
* testsuite/21_strings/inserters_extractors.cc
(test04): Ditto.
From-SVN: r51685
2002-04-01 08:55:05 +00:00
Benjamin Kosnik
fcaa810173
basic_string.tcc (string::_S_construct(_InIter, _InIter, const _Alloc&, forward_iterator_tag): Check for null.
...
2002-03-12 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/basic_string.tcc (string::_S_construct(_InIter,
_InIter, const _Alloc&, forward_iterator_tag): Check for null.
(string::basic_string(const _CharT* __s, const _Alloc& __a)): Same.
* testsuite/21_strings/ctor_copy_dtor.cc (test01): Re-enable, now
that memory limits are in place.
(test03): Add tests.
From-SVN: r50683
2002-03-12 22:10:34 +00:00
Phil Edwards
72c9b0629d
capacity.cc: Only explicitly instantiate on platforms with no weak support.
...
2002-03-11 Phil Edwards <pme@gcc.gnu.org>
* testsuite/21_strings/capacity.cc: Only explicitly instantiate on
platforms with no weak support.
* testsuite/27_io/ios_init.cc: Likewise.
From-SVN: r50597
2002-03-11 21:08:06 +00:00
Benjamin Kosnik
0d223e3a4e
std_iomanip.h: Inline, tweaks.
...
2002-02-19 Benjamin Kosnik <bkoz@redhat.com>
* include/std/std_iomanip.h: Inline, tweaks.
* config/linker-map.gnu: Remove hacks.
* testsuite/21_strings/capacity.cc: Add explicit instantiations.
* testsuite/27_io/ios_init.cc: Same.
* testsuite/22_locale/money_get_members_char.cc (test07): Fix.
* testsuite/22_locale/money_get_members_wchar_t.cc (test07): Same.
From-SVN: r49884
2002-02-20 00:58:17 +00:00
Benjamin Kosnik
aefb3380dd
signbitl.c: Copyright years as list, not range.
...
2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
* libmath/signbitl.c: Copyright years as list, not range.
* libmath/Makefile.am: Same.
* libmath/Makefie.in: Regenerate.
* libmath/signbit.c: Same.
* libmath/nan.c: Same.
* libmath/copysignf.c: Same.
* libmath/signbitf.c: Same.
* testsuite/22_locale/money_get_members_char.cc: Same.
* testsuite/22_locale/money_get_members_wchar_t.cc: Same.
* testsuite/22_locale/money_put_members_char.cc: Same.
* testsuite/22_locale/money_put_members_wchar_t.cc: Same.
* testsuite/22_locale/time_get_members_char.cc: Same.
* testsuite/22_locale/time_get_members_wchar_t.cc: Same.
* testsuite/22_locale/time_put_members_char.cc: Same.
* testsuite/22_locale/time_put_members_wchar_t.cc: Same.
* testsuite/21_strings/nonmember.cc: Same.
* testsuite/21_strings/compare.cc: Same.
* testsuite/27_io/stringstream.cc: Same.
* testsuite/27_io/stringbuf.cc: Same.
* testsuite/27_io/filebuf.cc: Same.
* testsuite/27_io/ios_manip_basefield.cc: Same.
* testsuite/27_io/ios_manip_fmtflags.cc: Same.
* include/bits/cpp_type_traits.h: Same.
* include/bits/generic_shadow.h: Same.
* include/bits/gslice_array.h: Same.
* include/bits/gslice.h: Same.
* include/bits/indirect_array.h: Same.
* include/bits/slice_array.h: Same.
* include/bits/sstream.tcc: Same.
* include/bits/streambuf_iterator.h: Same.
* include/bits/valarray_array.tcc: Same.
* include/bits/valarray_meta.h: Same.
* include/bits/valarray_array.h: Same.
* config/os/mingw32/bits/ctype_noninline.h: Same.
* config/os/mingw32/bits/ctype_base.h: Same.
* config/os/hpux/bits/ctype_noninline.h: Same.
* config/os/hpux/bits/ctype_base.h: Same.
* config/os/gnu-linux/bits/ctype_noninline.h: Same.
* config/os/gnu-linux/bits/ctype_base.h: Same.
* config/os/generic/bits/ctype_noninline.h: Same.
* config/os/generic/bits/ctype_base.h: Same.
* libsupc++/tinfo.h: Tweaks.
From-SVN: r48922
2002-01-16 19:57:39 +00:00
Paolo Carlini
c68cd521fa
2002-01-14 Paolo Carlini <pcarlini@unitus.it>
...
Nathan Myers <ncm@cantrip.org>
* include/bits/basic_string.h
(replace(__pos, __n1, __s, __n2)): Optimize by avoiding
temporaries (i.e., call _M_replace_safe) when possible.
(replace(__pos, __n, __str)): Call replace(__pos, __n1, __s, __n2).
(replace(__pos, __n1, __s)): Call replace(__pos, __n1, __s , __n2).
(replace(__i1, __i2, __str)): Call replace(__i1, __i2, __s, __n).
(replace(__i1, __i2, __s)): Call replace(__i1, __i2, __s, __n).
(replace(__i1, __i2, __s, __n)): Call replace(__pos1, __n1, __s, __n2).
* include/bits/basic_string.tcc
(replace(__pos1, __n1, __str, __pos2, __n2)): Call
replace(__pos, __n1, __s, __n2).
* testsuite/21_strings/replace.cc (test03): New testcases.
* include/bits/basic_string.h (insert(__pos, __s, __n)):
Adjust comparison wrt overflow.
Co-Authored-By: Nathan Myers <ncm@cantrip.org>
From-SVN: r48834
2002-01-14 19:04:15 +00:00
Paolo Carlini
bf95248579
basic_string.h (insert(__pos, __s, __n)): Optimize by avoiding temporaries and working in-place when possible.
...
2001-12-28 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers <ncm@cantrip.org>
* include/bits/basic_string.h (insert(__pos, __s, __n)):
Optimize by avoiding temporaries and working in-place when possible.
(insert(__pos1, __str)): Call insert(__pos1, __str, __pos2, __n).
(insert(__pos1, __str, __pos2, __n)): Call insert(__pos, __s, __n).
* testsuite/21_strings/insert.cc (test02): New testcases.
Co-Authored-By: Nathan Myers <ncm@cantrip.org>
From-SVN: r48345
2001-12-28 14:00:18 +00:00
Paolo Carlini
4b428ee570
assign.cc (test01): Add tests.
...
2001-12-16 Paolo Carlini <pcarlini@unitus.it>
* testsuite/21_strings/assign.cc (test01): Add tests.
From-SVN: r48078
2001-12-16 20:21:20 +00:00
Paolo Carlini
bd1f473825
2001-12-15 Paolo Carlini <pcarlini@unitus.it>
...
Nathan Myers <ncm@cantrip.org>
* include/bits/basic_string.h
(assign(__str, __pos, __n), assign(__s, __n)): Optimize
by avoiding unnecessary temporaries.
(assign(__s)): Call assign(__s, __n).
* include/bits/basic_string.tcc (_M_replace_safe): Adjust comment.
* include/bits/std_string.h: include stl_function.h.
* testsuite/21_strings/assign.cc (test02, test03): New tests.
Co-Authored-By: Nathan Myers <ncm@cantrip.org>
From-SVN: r48053
2001-12-16 01:02:17 +00:00
Paolo Carlini
dcc61724f1
re PR libstdc++/4548 (When reserving a string to become smaller, program crashes)
...
2001-11-21 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/4548
* include/bits/basic_string.tcc (basic_string::reserve): Never shrink
below the current size.
* testsuite/21_strings/capacity.cc (test02): Add test.
From-SVN: r47246
2001-11-21 22:04:53 +00:00
Paolo Carlini
9a304d1766
basic_string.h: Tweaks.
...
2001-10-30 Paolo Carlini <pcarlini@unitus.it>
Benjamin Kosnik <bkoz@redhat.com>
* include/bits/basic_string.h: Tweaks.
* include/bits/basic_string.tcc (string::_M_replace(iterator,
iterator, _ForwardIter, _ForwardIter, forward_iterator_tag): Fix.
* src/string-inst.cc: Tweaks, add instantiation.
* testsuite/21_strings/replace.cc (test02): Add test.
* testsuite/21_strings/assign.cc (test01): New file.
0
Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>
From-SVN: r46674
2001-10-31 08:27:20 +00:00
Phil Edwards
4c1805d702
c_strings.cc (test01, test02): Increase `carray' size.
...
2001-09-25 Phil Edwards <pme@gcc.gnu.org>
* testsuite/21_strings/c_strings.cc (test01, test02): Increase
`carray' size.
From-SVN: r45817
2001-09-26 01:45:49 +00:00
Phil Edwards
fe413112f8
acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): New macro, calls...
...
2001-08-06 Phil Edwards <pme@sources.redhat.com>
* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): New macro, calls...
(GLIBCPP_CHECK_SETRLIMIT): ...this new macro, which also uses...
(GLIBCPP_CHECK_SETRLIMIT_ancilliary): ...this new macro.
* configure.in (AM_CONFIG_HEADER): Also generate testsuite_hooks.h.
Call GLIBCPP_CONFIGURE_TESTSUITE.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* testsuite/lib/libstdc++-v3-dg.exp: Download new header instead
of old header.
* testsuite_flags.in: Add build dir's testsuite to INCLUDES.
* testsuite/debug_assert.h: Removed; contents merged into...
* testsuite/testsuite_hooks.h.in: ...here. New file.
* testsuite/17_intro/header_ciso646.cc: No longer include
debug_assert.h, include testsuite_hooks.h instead.
* testsuite/17_intro/header_fstream.cc: Likewise.
* testsuite/17_intro/header_iomanip.cc: Likewise.
* testsuite/17_intro/header_ios.cc: Likewise.
* testsuite/17_intro/header_iosfwd.cc: Likewise.
* testsuite/17_intro/header_iostream.cc: Likewise.
* testsuite/17_intro/header_istream.cc: Likewise.
* testsuite/17_intro/header_ostream.cc: Likewise.
* testsuite/17_intro/header_sstream.cc: Likewise.
* testsuite/17_intro/header_streambuf.cc: Likewise.
* testsuite/18_support/numeric_limits.cc: Likewise.
* testsuite/19_diagnostics/stdexceptions.cc: Likewise.
* testsuite/20_util/allocator_members.cc: Likewise.
* testsuite/20_util/auto_ptr.cc: Likewise.
* testsuite/20_util/pairs.cc: Likewise.
* testsuite/21_strings/append.cc: Likewise.
* testsuite/21_strings/capacity.cc: Likewise.
* testsuite/21_strings/char_traits_requirements.cc: Likewise.
* testsuite/21_strings/compare.cc: Likewise.
* testsuite/21_strings/ctor_copy_dtor.cc: Likewise. Also set up
call to (disabled) __set_testsuite_memlimit() wrapper.
* testsuite/21_strings/element_access.cc: Likewise.
* testsuite/21_strings/find.cc: Likewise.
* testsuite/21_strings/insert.cc: Likewise. Also set up call to
(disabled) __set_testsuite_memlimit() wrapper.
* testsuite/21_strings/inserters_extractors.cc: Likewise.
* testsuite/21_strings/invariants.cc: Likewise.
* testsuite/21_strings/nonmember.cc: Likewise.
* testsuite/21_strings/operations.cc: Likewise.
* testsuite/21_strings/replace.cc: Likewise.
* testsuite/21_strings/rfind.cc: Likewise.
* testsuite/21_strings/substr.cc: Likewise.
* testsuite/22_locale/codecvt_char_char.cc: Likewise.
* testsuite/22_locale/codecvt_unicode_char.cc: Likewise.
* testsuite/22_locale/codecvt_unicode_wchar_t.cc: Likewise.
* testsuite/22_locale/codecvt_wchar_t_char.cc: Likewise.
* testsuite/22_locale/ctor_copy_dtor.cc: Likewise.
* testsuite/22_locale/ctype_char_members.cc: Likewise.
* testsuite/22_locale/ctype_wchar_t_members.cc: Likewise.
* testsuite/22_locale/facet.cc: Likewise.
* testsuite/22_locale/global_templates.cc: Likewise.
* testsuite/22_locale/members.cc: Likewise.
* testsuite/22_locale/numpunct_byname.cc: Likewise.
* testsuite/22_locale/numpunct_char_members.cc: Likewise.
* testsuite/22_locale/operators.cc: Likewise.
* testsuite/22_locale/static_members.cc: Likewise.
* testsuite/23_containers/bitset_ctor.cc: Likewise.
* testsuite/23_containers/bitset_members.cc: Likewise.
* testsuite/23_containers/bitset_shift.cc: Likewise.
* testsuite/23_containers/vector_capacity.cc: Likewise.
* testsuite/23_containers/vector_ctor.cc: Likewise.
* testsuite/23_containers/vector_element_access.cc: Likewise.
* testsuite/23_containers/vector_modifiers.cc: Likewise.
* testsuite/24_iterators/istreambuf_iterator.cc: Likewise.
* testsuite/24_iterators/iterator.cc: Likewise.
* testsuite/24_iterators/ostreambuf_iterator.cc: Likewise.
* testsuite/25_algorithms/binary_search.cc: Likewise.
* testsuite/25_algorithms/copy.cc: Likewise.
* testsuite/25_algorithms/heap.cc: Likewise.
* testsuite/25_algorithms/lower_bound.cc: Likewise.
* testsuite/25_algorithms/min_max.cc: Likewise.
* testsuite/25_algorithms/partition.cc: Likewise.
* testsuite/25_algorithms/rotate.cc: Likewise.
* testsuite/25_algorithms/sort.cc: Likewise.
* testsuite/26_numerics/c_math.cc: Likewise.
* testsuite/26_numerics/complex_inserters_extractors.cc: Likewise.
* testsuite/26_numerics/complex_value.cc: Likewise.
* testsuite/27_io/filebuf.cc: Likewise.
* testsuite/27_io/filebuf_members.cc: Likewise.
* testsuite/27_io/filebuf_virtuals.cc: Likewise.
* testsuite/27_io/fpos.cc: Likewise.
* testsuite/27_io/fstream_members.cc: Likewise.
* testsuite/27_io/ifstream_members.cc: Likewise.
* testsuite/27_io/ios_base_callbacks.cc: Likewise.
* testsuite/27_io/ios_base_members_static.cc: Likewise.
* testsuite/27_io/ios_base_storage.cc: Likewise.
* testsuite/27_io/ios_ctor.cc: Likewise.
* testsuite/27_io/ios_init.cc: Likewise.
* testsuite/27_io/ios_manip_basefield.cc: Likewise.
* testsuite/27_io/ios_manip_fmtflags.cc: Likewise.
* testsuite/27_io/ios_members.cc: Likewise.
* testsuite/27_io/istream_extractor_arith.cc: Likewise.
* testsuite/27_io/istream_extractor_char.cc: Likewise.
* testsuite/27_io/istream_extractor_other.cc: Likewise.
* testsuite/27_io/istream_manip.cc: Likewise.
* testsuite/27_io/istream_seeks.cc: Likewise.
* testsuite/27_io/istream_sentry.cc: Likewise.
* testsuite/27_io/istream_unformatted.cc: Likewise.
* testsuite/27_io/istringstream_members.cc: Likewise.
* testsuite/27_io/narrow_stream_objects.cc: Likewise.
* testsuite/27_io/ofstream_members.cc: Likewise.
* testsuite/27_io/ostream_inserter_arith.cc: Likewise.
* testsuite/27_io/ostream_inserter_char.cc: Likewise.
* testsuite/27_io/ostream_inserter_other.cc: Likewise.
* testsuite/27_io/ostream_manip.cc: Likewise.
* testsuite/27_io/ostream_seeks.cc: Likewise.
* testsuite/27_io/ostream_unformatted.cc: Likewise.
* testsuite/27_io/ostringstream_members.cc: Likewise.
* testsuite/27_io/streambuf.cc: Likewise.
* testsuite/27_io/stringbuf.cc: Likewise.
* testsuite/27_io/stringbuf_virtuals.cc: Likewise.
* testsuite/27_io/stringstream.cc: Likewise.
* testsuite/27_io/stringstream_members.cc: Likewise.
* testsuite/27_io/wide_stream_objects.cc: Likewise.
From-SVN: r44679
2001-08-07 03:38:33 +00:00
Phil Edwards
48fe3de0c3
std_sstream.h (basic_stringbuf::basic_stringbuf(string): Initialize _M_string with pointer-and-size constructor, not just pointer.
...
2001-07-13 Phil Edwards <pme@sources.redhat.com>
* include/bits/std_sstream.h (basic_stringbuf::basic_stringbuf(string):
Initialize _M_string with pointer-and-size constructor, not just
pointer. Fix some comments.
* testsuite/21_strings/ctor_copy_dtor.cc (test03): New test.
* testsuite/27_io/stringbuf.cc (test02): Remove unused variable.
(test03): Add embedded-NUL tests.
* mkcheck.in: When printing totals, match the order of the tests.
* include/bits/stringfwd.h: Use same declaration keywords.
* include/bits/std_iosfwd.h: Cosmetic spacing.
From-SVN: r43996
2001-07-13 20:50:03 +00:00
Benjamin Kosnik
f4655693b5
stl_iterator.h (istream_iterator::operator->): Fix return values.
...
2001-06-26 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/stl_iterator.h (istream_iterator::operator->): Fix
return values.
(istream_iterator::operator*): Same.
2001-06-26 Benjamin Kosnik <bkoz@redhat.com>
Alexandre Petit-Bianco <apbianco@redhat.com>
* testsuite/21_strings/element_access.cc (test01): Chill Out Cafe
is on 41st, not 14th.
Co-Authored-By: Alexandre Petit-Bianco <apbianco@redhat.com>
From-SVN: r43574
2001-06-26 09:41:53 +00:00
Benjamin Kosnik
a16ad77946
inserters_extractors.cc (test09): New test.
...
2001-05-24 Benjamin Kosnik <bkoz@redhat.com>
libstdc++/2830
* testsuite/21_strings/inserters_extractors.cc (test09): New test.
* include/bits/ostream.tcc: Format to match istream.tcc.
(operator<<(basic_ostream __out, const basic_string __s)): Fix.
From-SVN: r42557
2001-05-25 04:24:12 +00:00
Mark Mitchell
eeff8d2c06
std_cstring.h: #define away all global functions we will redeclare in namespace `std'.
...
* include/c_std/bin/std_cstring.h: #define away all global
functions we will redeclare in namespace `std'.
* libsupc++/eh_alloc.cc (__cxa_allocate_exception): Use
std::memset, instead of memset.
* testsuite/19_diagnostics/stdexceptions.cc: Use `std::strcmp',
not plain `strcmp'.
* testsuite/21_strings/c_strings.cc: Use `std::strcpy' instead of
plain `strcpy'.
From-SVN: r42555
2001-05-25 01:33:21 +00:00
Benjamin Kosnik
d4fae8b1f0
c_strings.cc (main): Fix.
...
2001-05-21 Benjamin Kosnik <bkoz@kredhat.com>
* testsuite/21_strings/c_strings.cc (main): Fix.
From-SVN: r42420
2001-05-22 04:58:14 +00:00
Zack Weinberg
7edc73b46a
inserters_extractors.cc, [...]: Replace multi-line string constants with C89-style concatenated string constants.
...
2001-05-15 Zack Weinberg <zackw@stanford.edu>
* testsuite/21_strings/inserters_extractors.cc,
testsuite/27_io/istream_unformatted.cc,
testsuite/27_io/stringstream.cc:
Replace multi-line string constants with C89-style
concatenated string constants.
From-SVN: r42116
2001-05-15 20:46:50 +00:00
Benjamin Kosnik
04d930e6d4
*.cc: Remove spaces, make sure testcases return zero.
...
2001-05-11 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/*/*.cc: Remove spaces, make sure testcases return zero.
* testsuite/config/default.exp: Update bugs email address.
From-SVN: r41997
2001-05-12 16:53:08 +00:00
Benjamin Kosnik
eea790f7b3
std_cstring.h (memchr): Correct definitions.
...
2001-05-08 Benjamin Kosnik <bkoz@fillmore.constant.com>
* include/c_std/bits/std_cstring.h (memchr): Correct definitions.
(strchr): Same.
(strpbrk): Same.
(strrchr): Same.
(strstr): Same.
* include/c_std/bits/std_cwchar.h (wcschr): Same.
(wcsbrk): Same.
(wcsrchr): Same.
(wcsstr): Same.
(wmemchr): Same.
* testsuite/21_strings/c_strings.cc: Add tests.
From-SVN: r41919
2001-05-08 23:53:55 +00:00
Stephen M. Webb
57df35602e
std_cstring.h: Fix for const-correctness.
...
2001-04-02 Stephen M. Webb <stephen@bregmasoft.com>
* include/c_std/bits/std_cstring.h: Fix for const-correctness.
* include/c_std/bits/std_cwchar.h: Same.
* testsuite/21_strings/c_strings.cc: Add.
From-SVN: r41018
2001-04-02 22:01:52 +00:00
Benjamin Kosnik
b8f971fc25
char_traits.cc: Move to ...
...
2001-02-16 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/21_strings/char_traits.cc: Move to ...
* testsuite/21_strings/char_traits_requirements.cc: ..here.
* testsuite/21_strings/char_traits-int_type.cc: Move to ...
* testsuite/21_strings/char_traits_typedefs.cc: ..here.
From-SVN: r39784
2001-02-16 23:58:28 +00:00
Gabriel Dos Reis
b80253d7c0
char_traits.h (char_traits<char>::int_type): Change to `int' to match 21.1.3.1/2.
...
2001-02-11 Gabriel Dos Reis <gdr@codesourcery.com>
* include/bits/char_traits.h char_traits<char>::int_type: Change
to `int' to match 21.1.3.1/2.
* testsuite/21_strings/char_traits-int_type.C: New test.
From-SVN: r39581
2001-02-11 04:43:44 +00:00
Loren J. Rittle
31e1e0a652
inserters_extractors.cc: Remove explicit reference to 'testsuite/'.
...
2001-01-25 Loren J. Rittle <ljrittle@acm.org>
* testsuite/21_strings/inserters_extractors.cc: Remove
explicit reference to 'testsuite/'.
From-SVN: r39292
2001-01-26 23:31:57 +00:00
Benjamin Kosnik
13187a454d
C++STYLE (classname): Add more existing and stylish patterns.
...
2001-01-16 Benjamin Kosnik <bkoz@redhat.com>
* docs/html/17_intro/C++STYLE (classname): Add more existing
and stylish patterns.
libstdc++/944
* include/bits/istream.tcc (istream::sentry::sentry()): Set
failbit if the state of the stream is not good.
* testsuite/27_io/istream_sentry.cc (test02): Add test.
* testsuite/27_io/istream_manip.cc (test01): Modify.
libstdc++/1019
reported by Paolo Carlini <pcarlini@unitus.it>
* include/bits/istream.tcc (operator>>(istream&, string&)): Fix.
* testsuite/21_strings/inserters_extractors.cc (test08): Add test.
libstdc++/1057
* include/bits/std_streambuf.h (setp): Set _M_buf_size correctly.
* include/bits/streambuf.tcc (xsputn): Remove outside if clause.
(xsgetn): Same. Simplify.
* testsuite/27_io/streambuf.cc (test04): Add testcases.
reported by Larry Evans <jcampbell3@prodigy.net>
* include/bits/streambuf.tcc (streambuf::xsputn): Just check for
equality with eof on returned value from overflow.
From-SVN: r39059
2001-01-16 07:55:26 +00:00