Created on 2023-01-06.00:00:00 last changed 12 months ago
Proposed resolution:
This wording is relative to N4917.
Modify [ranges.cartesian.iterator] as indicated:
namespace std::ranges { template<input_range First, forward_range... Vs> requires (view<First> && ... && view<Vs>) template<bool Const> class cartesian_product_view<First, Vs...>::iterator { public: […] iterator()requires forward_range<maybe-const<Const, First>>= default; […] private: using Parent = maybe-const<Const, cartesian_product_view>; // exposition only Parent* parent_ = nullptr; // exposition only tuple<iterator_t<maybe-const<Const, First>>, iterator_t<maybe-const<Const, Vs>>...> current_; // exposition only […] }; }
[ 2023-02-13 Approved at February 2023 meeting in Issaquah. Status changed: Voting → WP. ]
[ 2023-02-01; Reflector poll ]
Set status to Tentatively Ready after nine votes in favour during reflector poll.
Currently, cartesian_product_view::iterator only provides the default constructor when the first range models forward_range, which seems too restrictive since several input iterators like istream_iterator are still default-constructible.
It would be more appropriate to constrain the default constructor only by whether the underlying iterator satisfies default_initializable, as most other range adaptors do. Since cartesian_product_view::iterator contains a tuple member that already has a constrained default constructor, the proposed resolution simply removes the constraint.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2023-02-13 10:17:57 | admin | set | messages: + msg13369 |
2023-02-13 10:17:57 | admin | set | status: voting -> wp |
2023-02-06 15:33:48 | admin | set | status: ready -> voting |
2023-02-01 20:33:52 | admin | set | messages: + msg13243 |
2023-02-01 20:33:52 | admin | set | status: new -> ready |
2023-01-06 16:24:01 | admin | set | messages: + msg13185 |
2023-01-06 00:00:00 | admin | create |