aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2004-01-26 12:58:53 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2004-01-26 12:58:53 +0000
commit4d39d873e0664935c3638dad36828cba877cb1f2 (patch)
tree4a9803ca1e1f77d1874c386dd176f542ca92630b /libstdc++-v3
parenta7bba6ca0e41334dfc3768af39b48a142c5ed34e (diff)
downloadgcc-4d39d873e0664935c3638dad36828cba877cb1f2.zip
gcc-4d39d873e0664935c3638dad36828cba877cb1f2.tar.gz
gcc-4d39d873e0664935c3638dad36828cba877cb1f2.tar.bz2
basic_string.h (replace(iterator, iterator, const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
2004-01-26 Paolo Carlini <pcarlini@suse.de> * include/bits/basic_string.h (replace(iterator, iterator, const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT. (replace(iterator, iterator, const _CharT*)): Ditto. (replace(iterator, iterator, const _CharT*, size_type)): Add missing _GLIBCXX_DEBUG_PEDASSERT. From-SVN: r76630
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/include/bits/basic_string.h17
2 files changed, 15 insertions, 10 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2ffa536..12222c8 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,13 @@
2004-01-26 Paolo Carlini <pcarlini@suse.de>
+ * include/bits/basic_string.h (replace(iterator, iterator,
+ const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
+ (replace(iterator, iterator, const _CharT*)): Ditto.
+ (replace(iterator, iterator, const _CharT*, size_type)):
+ Add missing _GLIBCXX_DEBUG_PEDASSERT.
+
+2004-01-26 Paolo Carlini <pcarlini@suse.de>
+
* include/bits/basic_string.tcc (replace(size_type,
size_type, const _CharT*, size_type)): Implement optimized
in-place algorithm for non-overlapping ranges.
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 19bb800..e28f8ef 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -1209,11 +1209,7 @@ namespace std
*/
basic_string&
replace(iterator __i1, iterator __i2, const basic_string& __str)
- {
- _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
- && __i2 <= _M_iend());
- return this->replace(__i1, __i2, __str._M_data(), __str.size());
- }
+ { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
/**
* @brief Replace range of characters with C substring.
@@ -1230,9 +1226,12 @@ namespace std
* change if an error is thrown.
*/
basic_string&
- replace(iterator __i1, iterator __i2,
- const _CharT* __s, size_type __n)
- { return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); }
+ replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
+ }
/**
* @brief Replace range of characters with C string.
@@ -1250,8 +1249,6 @@ namespace std
basic_string&
replace(iterator __i1, iterator __i2, const _CharT* __s)
{
- _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
- && __i2 <= _M_iend());
__glibcxx_requires_string(__s);
return this->replace(__i1, __i2, __s, traits_type::length(__s));
}