[libcxx-commits] [libcxx] 7d7dcc1 - [libc++][NFC] Remove dead code in <list> (#65651)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 8 05:52:06 PDT 2023


Author: Louis Dionne
Date: 2023-09-08T08:52:02-04:00
New Revision: 7d7dcc1f253c536c2909d243eef14cc17a979988

URL: https://github.com/llvm/llvm-project/commit/7d7dcc1f253c536c2909d243eef14cc17a979988
DIFF: https://github.com/llvm/llvm-project/commit/7d7dcc1f253c536c2909d243eef14cc17a979988.diff

LOG: [libc++][NFC] Remove dead code in <list> (#65651)

I came across this function (which is never used) while doing other
changes. It should be safe to remove since it's not used anywhere.

Added: 
    

Modified: 
    libcxx/include/list

Removed: 
    


################################################################################
diff  --git a/libcxx/include/list b/libcxx/include/list
index 37bed3cd89fc96a..77b988cd1ef911b 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -1779,17 +1779,6 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i)
     }
 }
 
-template <class _Iterator>
-_LIBCPP_HIDE_FROM_ABI
-bool __iterator_in_range(_Iterator __first, _Iterator __last, _Iterator __it) {
-    for (_Iterator __p = __first; __p != __last; ++__p) {
-        if (__p == __it) {
-            return true;
-        }
-    }
-    return false;
-}
-
 template <class _Tp, class _Alloc>
 void
 list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l)


        


More information about the libcxx-commits mailing list