You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2007/11/01 19:23:50 UTC

[jira] Created: (STDCXX-632) std::string::insert (InputIterator, InputIterator) inserting self incorrect

std::string::insert (InputIterator, InputIterator) inserting self incorrect
---------------------------------------------------------------------------

                 Key: STDCXX-632
                 URL: https://issues.apache.org/jira/browse/STDCXX-632
             Project: C++ Standard Library
          Issue Type: Bug
          Components: 21. Strings
    Affects Versions: 4.2, 4.1.4, 4.1.3, 4.1.2
         Environment: All
            Reporter: Farid Zaripov
            Priority: Minor
             Fix For: 4.2.1


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);
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (STDCXX-632) std::string::insert (iterator, InputIterator, InputIterator) inserting self incorrect

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov reassigned STDCXX-632:
------------------------------------

    Assignee: Farid Zaripov

> std::string::insert (iterator, InputIterator, InputIterator) inserting self incorrect
> -------------------------------------------------------------------------------------
>
>                 Key: STDCXX-632
>                 URL: https://issues.apache.org/jira/browse/STDCXX-632
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 21. Strings
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-632) std::string::insert (iterator, InputIterator, InputIterator) inserting self incorrect

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov updated STDCXX-632:
---------------------------------

    Summary: std::string::insert (iterator, InputIterator, InputIterator) inserting self incorrect  (was: std::string::insert (InputIterator, InputIterator) inserting self incorrect)

> std::string::insert (iterator, InputIterator, InputIterator) inserting self incorrect
> -------------------------------------------------------------------------------------
>
>                 Key: STDCXX-632
>                 URL: https://issues.apache.org/jira/browse/STDCXX-632
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 21. Strings
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2
>         Environment: All
>            Reporter: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.