mclow.lists added inline comments.

================
Comment at: include/algorithm:2511
+    difference_type __len1, __len2;
+    __len1 = __middle - __first;
+    __len2 = __last - __middle;
----------------
These iterator calculations only work for random access iterators.
Does this actually work with forward iterators?




================
Comment at: include/algorithm:2515
+    {
+        pointer __buff_end = __move(__first, __middle,  __buff);
+        __move(__middle, __last, __first);
----------------
Probably a good idea to qualify these calls with `_VSTD::` to ensure that no 
inadvertent ADL happens.


================
Comment at: include/algorithm:4582
+        //__middle = _VSTD::rotate(__m1, __middle, __m2);
+        __middle = _VSTD::__buffered_rotate(__m1, __middle, __m2, __buff, 
__buff_size);
         // __len12 and __len21 now have swapped meanings
----------------
It seems a shame to calculate `__len1`, etc on L#2511 above when you have them 
right here.


Repository:
  rCXX libc++

https://reviews.llvm.org/D42357



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to