Created on 2010-02-19.00:00:00 last changed 162 months ago
Proposed resolution:
In [basic.string], class template basic_string synopsis change as indicated:
// 21.4.6 modifiers: ... basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str); basic_string& replace(const_iterator i1, const_iterator i2, const charT* s, size_type n); basic_string& replace(const_iterator i1, const_iterator i2, const charT* s); basic_string& replace(const_iterator i1, const_iterator i2, size_type n, charT c); template<class InputIterator> basic_string& replace(const_iterator i1, const_iterator i2, InputIterator j1, InputIterator j2); basic_string& replace(const_iterator, const_iterator, initializer_list<charT>);
In [string.replace] before p.18, change the following signatures as indicated:
basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str);
In [string.replace] before p.21, change the following signatures as indicated:
basic_string& replace(const_iterator i1, const_iterator i2, const charT* s, size_type n);
In [string.replace] before p.24, change the following signatures as indicated:
basic_string& replace(const_iterator i1, const_iterator i2, const charT* s);
In [string.replace] before p.27, change the following signatures as indicated:
basic_string& replace(const_iterator i1, const_iterator i2, size_type n, charT c);
In [string.replace] before p.30, change the following signatures as indicated:
template<class InputIterator> basic_string& replace(const_iterator i1, const_iterator i2, InputIterator j1, InputIterator j2);
In [string.replace] before p.33, change the following signatures as indicated:
basic_string& replace(const_iterator i1, const_iterator i2, initializer_list<charT> il);
[ Adopted at 2010-11 Batavia ]
[ Post-Rapperswil: ]
Moved to Tentatively Ready after 5 positive votes on c++std-lib.
In contrast to all library usages of purely positional iterator values several overloads of std::basic_string::replace still use iterator instead of const_iterator arguments. The paper N3021 quite nicely visualizes the purely positional responsibilities of the function arguments.
This should be fixed to make the library consistent, the proposed changes are quite mechanic.
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-11-24 14:01:03 | admin | set | messages: + msg5423 |
2010-11-14 13:10:57 | admin | set | status: voting -> wp |
2010-11-08 14:14:39 | admin | set | status: ready -> voting |
2010-10-21 19:06:53 | admin | set | messages: + msg4770 |
2010-10-21 19:06:53 | admin | set | status: new -> ready |
2010-10-21 18:28:33 | admin | set | messages: + msg1598 |
2010-02-19 00:00:00 | admin | create |