This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]