From 561e7a36e38004d567ada2f0dac327b80d506009 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 24 May 2005 10:58:22 +0000 Subject: [multiple changes] 2005-05-24 Jonathan Wakely * include/debug/string (class basic_string): Add missing default template arguments; provide typedefs for char and wchar_t. (operator[]): Allow s[s.size()] in debug mode, but not pedantic mode. 2005-05-24 Paolo Carlini Port from libstdcxx_so_7-branch: 2005-04-25 Christopher Jefferson * include/bits/stl_algo.h (count): Correct concept checks. (search_n) : Likewise. * testsuite/25_algorithms/search_n/check_type.cc: New. * testsuite/testsuite_iterators.h (random_access_iterator_wrapper::operator+): Move out of class to external function, and add symmetric version. 2005-03-14 Christopher Jefferson * testsuite/testsuite_iterators.h (WritableObject::WritableObject): Add const. 2005-02-01 Christopher Jefferson * testsuite/testsuite_iterators.h (random_access_iterator_wrapper:: operator--): Fix typo. (OutputContainer::OutputContainer): Correct zeroing array. (WritableObject::operator==): Fix typo. (WritableObject::operator=): make operator= templated to allow differing types to be assigned. (WritableObject::operator++): Fix checking if iterator is written to multiple times. (random_access_iterator_wrapper::operator+): Add const. (random_access_iterator_wrapper::operator-): Likewise. (random_access_iterator_wrapper::operator[]): Add dereference. From-SVN: r100101 --- libstdc++-v3/include/debug/string | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'libstdc++-v3/include/debug') diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string index a91c004..3893cd2 100644 --- a/libstdc++-v3/include/debug/string +++ b/libstdc++-v3/include/debug/string @@ -1,6 +1,6 @@ // Debugging string implementation -*- C++ -*- -// Copyright (C) 2003 +// Copyright (C) 2003, 2005 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -37,7 +37,8 @@ namespace __gnu_debug { - template +template, + typename _Allocator = std::allocator<_CharT> > class basic_string : public std::basic_string<_CharT, _Traits, _Allocator>, public __gnu_debug::_Safe_sequencesize(), + _M_message(::__gnu_debug::__msg_subscript_oob) + ._M_sequence(*this, "this") + ._M_integer(__pos, "__pos") + ._M_integer(this->size(), "size")); +#endif return _M_base()[__pos]; } @@ -996,6 +1006,13 @@ namespace __gnu_debug __str._M_invalidate_all(); return __res; } + + typedef basic_string string; + +#ifdef _GLIBCXX_USE_WCHAR_T + typedef basic_string wstring; +#endif + } // namespace __gnu_debug #endif -- cgit v1.1