This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libstdc++ PATCH] fix basic_string::replace for integral types
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Doug Gregor <dgregor at apple dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: 20 Jun 2003 20:20:30 +0200
- Subject: Re: [libstdc++ PATCH] fix basic_string::replace for integral types
- Organization: Integrable Solutions
- References: <75FB9EAE-A33D-11D7-971F-00039354D67A@apple.com>
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