[libcxx-commits] [PATCH] D154612: [libc++][NFC] Add 'const' to some operator()

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 6 13:47:00 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG9101479420aa: [libc++][NFC] Add 'const' to some operator() (authored by ldionne).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154612/new/

https://reviews.llvm.org/D154612

Files:
  libcxx/include/__algorithm/copy.h
  libcxx/include/__algorithm/copy_backward.h
  libcxx/include/__algorithm/move.h
  libcxx/include/__algorithm/move_backward.h


Index: libcxx/include/__algorithm/move_backward.h
===================================================================
--- libcxx/include/__algorithm/move_backward.h
+++ libcxx/include/__algorithm/move_backward.h
@@ -80,7 +80,7 @@
                               !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
                           int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
-  operator()(_InIter __first, _InIter __last, _OutIter __result) {
+  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
     using _Traits = __segmented_iterator_traits<_OutIter>;
     using _DiffT  = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;
 
Index: libcxx/include/__algorithm/move.h
===================================================================
--- libcxx/include/__algorithm/move.h
+++ libcxx/include/__algorithm/move.h
@@ -73,7 +73,7 @@
                               !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
                           int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
-  operator()(_InIter __first, _InIter __last, _OutIter __result) {
+  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
     using _Traits = __segmented_iterator_traits<_OutIter>;
     using _DiffT  = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;
 
Index: libcxx/include/__algorithm/copy_backward.h
===================================================================
--- libcxx/include/__algorithm/copy_backward.h
+++ libcxx/include/__algorithm/copy_backward.h
@@ -80,7 +80,7 @@
                               !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
                           int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
-  operator()(_InIter __first, _InIter __last, _OutIter __result) {
+  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
     using _Traits           = __segmented_iterator_traits<_OutIter>;
     auto __orig_last        = __last;
     auto __segment_iterator = _Traits::__segment(__result);
Index: libcxx/include/__algorithm/copy.h
===================================================================
--- libcxx/include/__algorithm/copy.h
+++ libcxx/include/__algorithm/copy.h
@@ -72,7 +72,7 @@
                               !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
                           int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
-  operator()(_InIter __first, _InIter __last, _OutIter __result) {
+  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
     using _Traits = __segmented_iterator_traits<_OutIter>;
     using _DiffT  = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154612.537870.patch
Type: text/x-patch
Size: 3019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230706/c718b956/attachment.bin>


More information about the libcxx-commits mailing list