mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 08:43:26 +08:00
basic_string.h (_M_replace_aux, [...]): Move out of line...
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. From-SVN: r89637
This commit is contained in:
parent
fdc6959794
commit
6bfad5e135
@ -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&),
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user