[libcxx-commits] [libcxx] [libc++] Remove `wrap_iter::base()` (PR #179389)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 3 01:48:21 PST 2026


================
@@ -100,9 +102,39 @@ class __wrap_iter {
     return __i_[__n];
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 iterator_type base() const _NOEXCEPT { return __i_; }
-
 private:
+  template <class _Iter1>
+  _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
+  operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT;
----------------
frederick-vs-ja wrote:

I wonder whether it would be better to make these operator hidden friends (not just friends), i.e. to move the definitions into the class body.

https://github.com/llvm/llvm-project/pull/179389


More information about the libcxx-commits mailing list