[libcxx-commits] [libcxx] [libc++] Remove non-standard member type iterator_type from __wrap_iter (PR #186871)
Nikhil Kotikalapudi via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 19 23:18:37 PDT 2026
https://github.com/23silicon updated https://github.com/llvm/llvm-project/pull/186871
>From 10773ce2061f376afbf534afc7428b59cb9fbff1 Mon Sep 17 00:00:00 2001
From: 23silicon <nak00001 at outlook.com>
Date: Mon, 16 Mar 2026 15:21:22 -0400
Subject: [PATCH] removed iterator_type member type from __wrap_iter in libcxx,
23.rst update
23.rst update
revert changes in legacy libc++ wrap_iter.h
release notes fix
---
libcxx/docs/ReleaseNotes/23.rst | 4 ++--
libcxx/include/__iterator/wrap_iter.h | 15 +++++++--------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/libcxx/docs/ReleaseNotes/23.rst b/libcxx/docs/ReleaseNotes/23.rst
index 4441a8aed198c3..9fcb0bbe98303e 100644
--- a/libcxx/docs/ReleaseNotes/23.rst
+++ b/libcxx/docs/ReleaseNotes/23.rst
@@ -55,8 +55,8 @@ Deprecations and Removals
- The ``std::launch::any`` enumerator that was accidentally provided as an extension is now deprecated.
It will be removed in LLVM 25.
-- ``__wrap_iter``'s (iterator type for ``array``, ``span``, ``string``, ``string_view`` and ``vector``) ``base()``
- method has been removed as it was non-standard.
+- In ``__wrap_iter`` (iterator wrapper type for ``array``, ``span``, ``string``, ``string_view`` and ``vector``),
+ the ``base()`` method and ``iterator_type`` member type have been removed as they are non-standard.
Potentially breaking changes
----------------------------
diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h
index c1b27b8242cd9b..576adfbce38412 100644
--- a/libcxx/include/__iterator/wrap_iter.h
+++ b/libcxx/include/__iterator/wrap_iter.h
@@ -34,18 +34,17 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iter>
class __wrap_iter {
public:
- typedef _Iter iterator_type;
- typedef typename iterator_traits<iterator_type>::value_type value_type;
- typedef typename iterator_traits<iterator_type>::difference_type difference_type;
- typedef typename iterator_traits<iterator_type>::pointer pointer;
- typedef typename iterator_traits<iterator_type>::reference reference;
- typedef typename iterator_traits<iterator_type>::iterator_category iterator_category;
+ typedef typename iterator_traits<_Iter>::value_type value_type;
+ typedef typename iterator_traits<_Iter>::difference_type difference_type;
+ typedef typename iterator_traits<_Iter>::pointer pointer;
+ typedef typename iterator_traits<_Iter>::reference reference;
+ typedef typename iterator_traits<_Iter>::iterator_category iterator_category;
#if _LIBCPP_STD_VER >= 20
typedef contiguous_iterator_tag iterator_concept;
#endif
private:
- iterator_type __i_;
+ _Iter __i_;
friend struct pointer_traits<__wrap_iter<_Iter> >;
@@ -103,7 +102,7 @@ class __wrap_iter {
}
private:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __wrap_iter(iterator_type __x) _NOEXCEPT : __i_(__x) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __wrap_iter(_Iter __x) _NOEXCEPT : __i_(__x) {}
template <class _Up>
friend class __wrap_iter;
More information about the libcxx-commits
mailing list