string::replace (Iterator i1, Iterator i2, InputIterator j1, InputIterator j2)
works incorrectly when j1 and j2 are iterators pointing to the same string
---------------------------------------------------------------------------------------------------------------------------------------------------------
Key: STDCXX-170
URL: http://issues.apache.org/jira/browse/STDCXX-170
Project: C++ Standard Library
Type: Bug
Components: 21. Strings
Versions: 4.1.3
Environment: all
Reporter: Anton Pevtsov
Priority: Minor
This test fails:
#include <iostream>
#include <string>
static const char* test = "babc";
int main (void)
{
std::string s ("abc");
s.replace (s.begin (), s.begin (), s.begin () + 1, s.begin () + 2);
std::cout << "Expected " << test << " and got " << s << '\n';
return 0;
}
The output is "Expected babc and got aabc".
See details here:
http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200604.mbox/[EMAIL
PROTECTED]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira