[libstdc++ PATCH] fix basic_string::replace for integral types

Doug Gregor dgregor@apple.com
Fri Jun 20 16:37:00 GMT 2003


The implementation of basic_string::replace with this signature:

   template<class InputIterator>
     basic_string& replace(iterator i1, iterator i2, InputIterator j1, 
InputIterator j2);

does not dispatch appropriately when InputIterator is an integral type. 
This patch adds an _Is_integer check to handle the case properly. 
Tested on mainline, powerpc-apple-darwin6.6; no regressions, and the 
new test passes.

	Doug

-------------- next part --------------
A non-text attachment was scrubbed...
Name: basic-string-replace.patch
Type: application/octet-stream
Size: 5550 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030620/56435e35/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basic-string-replace.ChangeLog
Type: application/octet-stream
Size: 530 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030620/56435e35/attachment-0001.obj>


More information about the Libstdc++ mailing list