aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/basic_string.h17
-rw-r--r--libstdc++-v3/include/bits/basic_string.tcc27
3 files changed, 34 insertions, 16 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f51f6f1..71d793d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
+ Move out of line...
+ * include/bits/basic_string.tcc: ... here.
+
2004-10-26 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (append(const basic_string&),
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 6550b9c..be340ff 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -1435,24 +1435,11 @@ namespace std
basic_string&
_M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
- _CharT __c)
- {
- _M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
- _M_mutate(__pos1, __n1, __n2);
- if (__n2)
- _M_assign(_M_data() + __pos1, __n2, __c);
- return *this;
- }
+ _CharT __c);
basic_string&
_M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
- size_type __n2)
- {
- _M_mutate(__pos1, __n1, __n2);
- if (__n2)
- _M_copy(_M_data() + __pos1, __s, __n2);
- return *this;
- }
+ size_type __n2);
// _S_construct_aux is used to implement the 21.3.1 para 15 which
// requires special behaviour if _InIter is an integral type
diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index 6bd1296..b5f8645 100644
--- a/libstdc++-v3/include/bits/basic_string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -620,7 +620,32 @@ namespace std
return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(),
__s.size());
}
-
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+ _CharT __c)
+ {
+ _M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
+ _M_mutate(__pos1, __n1, __n2);
+ if (__n2)
+ _M_assign(_M_data() + __pos1, __n2, __c);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
+ size_type __n2)
+ {
+ _M_mutate(__pos1, __n1, __n2);
+ if (__n2)
+ _M_copy(_M_data() + __pos1, __s, __n2);
+ return *this;
+ }
+
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>
operator+(const _CharT* __lhs,