[libcxx] r174544 - Marcin Zalewski: Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.

Howard Hinnant hhinnant at apple.com
Wed Feb 6 13:03:39 PST 2013


Author: hhinnant
Date: Wed Feb  6 15:03:39 2013
New Revision: 174544

URL: http://llvm.org/viewvc/llvm-project?rev=174544&view=rev
Log:
Marcin Zalewski:  Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.

Modified:
    libcxx/trunk/include/algorithm

Modified: libcxx/trunk/include/algorithm
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/algorithm?rev=174544&r1=174543&r2=174544&view=diff
==============================================================================
--- libcxx/trunk/include/algorithm (original)
+++ libcxx/trunk/include/algorithm Wed Feb  6 15:03:39 2013
@@ -1528,10 +1528,10 @@ copy(_InputIterator __first, _InputItera
 
 // copy_backward
 
-template <class _InputIterator, class _OutputIterator>
+template <class _BidirectionalIterator, class _OutputIterator>
 inline _LIBCPP_INLINE_VISIBILITY
 _OutputIterator
-__copy_backward(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
+__copy_backward(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result)
 {
     while (__first != __last)
         *--__result = *--__last;





More information about the cfe-commits mailing list