[libstdc++ PATCH] fix basic_string::replace for integral types
Gabriel Dos Reis
gdr@integrable-solutions.net
Fri Jun 20 18:23:00 GMT 2003
Doug Gregor <dgregor@apple.com> writes:
| 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.
The patch is OK, modulo nits in the ChangeLog: please do capitalize
the first word, i.e.
* include/bits/basic_string.h (basic_string::replace): Dispatch
_InputIterator version based on _Is_integer.
instead of
* include/bits/basic_string.h (basic_string::replace): dispatch
_InputIterator version based on _Is_integer.
Thanks,
-- Gaby
More information about the Libstdc++
mailing list