Issue Details (XML | Word | Printable)

Key: STDCXX-632
Type: Bug Bug
Status: Reopened Reopened
Priority: Minor Minor
Assignee: Unassigned
Reporter: Farid Zaripov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

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

Created: 01/Nov/07 06:22 PM   Updated: 11/Jul/09 12:06 AM
Return to search
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

Time Tracking:
Not Specified

Environment: All
Issue Links:
Dependants
 
dependent
 

Severity: Incorrect Behavior


 Description  « Hide
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);
}



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Farid Zaripov made changes - 01/Nov/07 06:22 PM
Field Original Value New Value
Link This issue depends upon STDCXX-170 [ STDCXX-170 ]
Farid Zaripov made changes - 01/Nov/07 06:23 PM
Summary std::string::insert (InputIterator, InputIterator) inserting self incorrect std::string::insert (iterator, InputIterator, InputIterator) inserting self incorrect
Farid Zaripov made changes - 01/Nov/07 06:24 PM
Link This issue blocks STDCXX-633 [ STDCXX-633 ]
Farid Zaripov made changes - 21/Nov/07 06:26 PM
Assignee Farid Zaripov [ farid ]
Farid Zaripov made changes - 22/Feb/08 05:42 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Farid Zaripov made changes - 17/Mar/08 02:32 PM
Fix Version/s 4.2.1 [ 12312690 ]
Fix Version/s 4.3 [ 12312692 ]
Farid Zaripov made changes - 17/Mar/08 02:32 PM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
Farid Zaripov made changes - 14/May/08 04:45 PM
Assignee Farid Zaripov [ farid ]
Travis Vitek made changes - 06/Jun/08 04:44 PM
Assignee Travis Vitek [ vitek ]
Travis Vitek made changes - 11/Jul/09 12:06 AM
Assignee Travis Vitek [ vitek ]