diff options
author | Paolo Carlini <pcarlini@suse.de> | 2004-01-24 11:34:06 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2004-01-24 11:34:06 +0000 |
commit | fefe561e809323e473448eb6a3631d3db31f2717 (patch) | |
tree | 4e1c1b77a0ef67db596859fbb4c004d8cfe99c74 /libstdc++-v3/include/bits/basic_string.h | |
parent | 5473cfa7fd6c83fc6f7f1575dad275690aa29ded (diff) |
basic_string.h (assign(const basic_string&, size_type, size_type)): Define inline here.
2004-01-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (assign(const basic_string&,
size_type, size_type)): Define inline here.
(replace(size_type, size_type, const basic_string&,
size_type, size_type)): Ditto.
(_M_replace_dispatch(iterator, iterator, _InputIterator,
_InputIterator, __false_type)): Only declare.
(_M_replace(iterator, iterator, _InputIterator,
_InputIterator)): Remove.
* include/bits/basic_string.tcc (assign(const basic_string&,
size_type, size_type)): Move inline.
(replace(size_type, size_type, const basic_string&,
size_type, size_type)): Ditto.
(_M_replace_dispatch(iterator, iterator, _InputIterator,
_InputIterator, __false_type)): Define, now does also what
_M_replace did before.
* src/string-inst.cc (_M_replace): Don't instantiate.
* include/bits/basic_string.tcc (find(const _CharT*,
size_type, size_type)): Tidy.
(rfind(_CharT, size_type)): Ditto.
(find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
(find_first_not_of(_CharT, size_type)): Ditto.
(find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
(find_last_not_of(_CharT, size_type)): Ditto.
From-SVN: r76508
Diffstat (limited to 'libstdc++-v3/include/bits/basic_string.h')
-rw-r--r-- | libstdc++-v3/include/bits/basic_string.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 1b7cc764ff3..9e375835060 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -794,7 +794,10 @@ namespace std * of available characters in @a str, the remainder of @a str is used. */ basic_string& - assign(const basic_string& __str, size_type __pos, size_type __n); + assign(const basic_string& __str, size_type __pos, size_type __n) + { return this->assign(__str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } /** * @brief Set value to a C substring. @@ -1127,7 +1130,10 @@ namespace std */ basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, - size_type __pos2, size_type __n2); + size_type __pos2, size_type __n2) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } /** * @brief Replace characters with value of a C substring. @@ -1357,17 +1363,11 @@ namespace std template<class _InputIterator> basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, - _InputIterator __k2, __false_type) - { return _M_replace(__i1, __i2, __k1, __k2); } + _InputIterator __k2, __false_type); basic_string& _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c); - template<class _InputIterator> - basic_string& - _M_replace(iterator __i1, iterator __i2, _InputIterator __k1, - _InputIterator __k2); - basic_string& _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2); |