stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Pevtsov (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-170) string::replace (Iterator i1, Iterator i2, InputIterator j1, InputIterator j2) works incorrectly when j1 and j2 are iterators pointing to the same string
Date Wed, 05 Apr 2006 08:56:45 GMT
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/%3c44337C76.4020909@roguewave.com%3e


-- 
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


Mime
View raw message