[Patch] Remove workaround for copy_backward

Paolo Carlini pcarlini@unitus.it
Sat Sep 27 16:34:00 GMT 2003


Hi all, hi Gaby,

in the current code there is this disclaimer:

// This dispatch class is a workaround for compilers that do not
// have partial ordering of function templates.  All we're doing is
// creating a specialization so that we can turn a call to copy_backward
// into a memmove whenever possible.
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
         typename _BoolType>
  struct __copy_backward_dispatch(...

However, interestingly, before it, in the implementation of copy, partial
ordering of function templates *is used*, and this is safe since current
g++ is actually ok (the disclaimer dates back to SGI/HP, I think!).

Therefore, I simply removed the workaround and used for copy_backward the
very same dispatching strategy already present for copy.

Regtested x86-linux, of course, but I don't consider myself a templates
wizard ;), therefore I'm asking humbly for a review, Gaby and
everyone!

Paolo.

///////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_copy_backward
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030927/49feb8c3/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_copy_backward
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030927/49feb8c3/attachment-0001.ksh>


More information about the Libstdc++ mailing list