
|
If you were logged in you would be able to see more operations.
|
|
|
|
|
| Component/s: |
21. Strings
|
| Affects Version/s: |
4.1.2,
4.1.3,
4.1.4,
4.2.0
|
| Fix Version/s: |
4.3.0
|
|
|
Environment:
|
All
|
|
Issue Links:
|
Dependants
|
|
|
|
dependent
|
|
This issue depends upon:
|
|
|
STDCXX-170 std::string::replace (iterator, iterator, InputIterator, InputIterator) inserting self incorrect
|
|
|
|
|
|
|
|
| Severity: |
Incorrect Behavior
|
The 21.string.insert.cpp test has been failing a number of assertions for self-referential test cases that exercise the ability to insert a substring of a string into itself using the insert(iterator, InputIterator, InputIterator) member template specialization for InputIterator being an actual Input Iterator. The program below reproduces the problem in a small isolated test case.
#include <cassert>
#include <string>
int main ()
{
std::string s ("abc");
typedef const unsigned char UChar;
s.insert (s.begin (), (UChar*)&s [1], (UChar*)&s [2]);
assert ("babc" == s);
}
|
|
Description
|
The 21.string.insert.cpp test has been failing a number of assertions for self-referential test cases that exercise the ability to insert a substring of a string into itself using the insert(iterator, InputIterator, InputIterator) member template specialization for InputIterator being an actual Input Iterator. The program below reproduces the problem in a small isolated test case.
#include <cassert>
#include <string>
int main ()
{
std::string s ("abc");
typedef const unsigned char UChar;
s.insert (s.begin (), (UChar*)&s [1], (UChar*)&s [2]);
assert ("babc" == s);
} |
Show » |
|