[libcxx-commits] [libcxx] [libc++][ranges] LWG3564: `transform_view::iterator<true>::value_type` and `iterator_category` should use `const F&` (PR #91816)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 10 18:20:28 PDT 2024


================
@@ -173,7 +173,7 @@ template <input_range _View, copy_constructible _Fn>
 #  endif
   requires __transform_view_constraints<_View, _Fn>
 template <bool _Const>
-class transform_view<_View, _Fn>::__iterator : public __transform_view_iterator_category_base<_View, _Fn> {
+class transform_view<_View, _Fn>::__iterator : public __transform_view_iterator_category_base<_View, _Fn, _Const> {
----------------
frederick-vs-ja wrote:

It seems that we can use `__maybe_const<_Const, _Fn>` here and avoid modifying `__transform_view_iterator_category_base`.

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


More information about the libcxx-commits mailing list