Created on 2019-11-06.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4835.
Modify [range.transform.view], class template transform_view synopsis, as indicated:
namespace std::ranges { template<input_range V, copy_constructible F> requires view<V> && is_object_v<F> && regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>> class transform_view : public view_interface<transform_view<V, F>> { […] }; […] }
[ 2019-11 Status to Ready during Wednesday night issue processing in Belfast. ]
Addresses US 303
The transform_view does not constrain the return type of the transformation function. It is invalid to pass a void-returning transformation function to the transform_view, which would cause its iterators' operator* member to return void.
Proposed change:Change the constraints on transform_view to the following:
template<input_range V, copy_constructible F> requires view<V> && is_object_v<F> && regular_invocable<F&, range_reference_t<V>> && can-reference<invoke_result_t<F&, range_reference_t<V>>> class transform_view;
Jonathan Wakely:
The NB comment says "The transform_view does not constrain the return type of the transformation function. It is invalid to pass a void-returning transformation function to the transform_view, which would cause its iterators' operator* member to return void."History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: voting -> wp |
2020-01-17 04:54:50 | admin | set | status: ready -> voting |
2019-11-07 08:02:35 | admin | set | messages: + msg10776 |
2019-11-07 08:02:35 | admin | set | status: new -> ready |
2019-11-06 20:24:59 | admin | set | messages: + msg10766 |
2019-11-06 00:00:00 | admin | create |