[libcxx-commits] [libcxx] [libc++] Merge the private iterator_traits aliases with their ranges versions (PR #162661)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 16 02:44:08 PDT 2025


================
@@ -71,15 +65,9 @@ struct _ClassicAlgPolicy {};
 
 template <>
 struct _IterOps<_ClassicAlgPolicy> {
-  template <class _Iter>
-  using __value_type _LIBCPP_NODEBUG = typename iterator_traits<_Iter>::value_type;
----------------
philnik777 wrote:

I'm really not that worried about a `value_type`/`element_type` mismatch. That rather seems to me like something worth diagnosing, since it's almost certainly user error. I'm not sure it's actually specified anywhere, but the intention that `remove_reference_t<decltype(*iter)>` is `element_type` seems rather clear to me.

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


More information about the libcxx-commits mailing list