Thank you! You are right. The idea was that the test also tests the const overloads of begin() and end() of reverse_view. But the view concept requires movable. Maybe, this should just be
static_assert(std::ranges::range<const decltype(v)>); instead? The test in the patch now has the same static_assert twice. Am 23.03.21 um 18:09 schrieb Jonathan Wakely:
On 23/03/21 16:25 +0000, Jonathan Wakely wrote:On 03/03/21 20:26 +0100, Moritz Sichert via Libstdc++ wrote:Thanks for the review. I attached the updated patch. Can you commit this for me or point me to what I should do next? This is my first contribution here.I was about to do this, but ...+namespace test_ns +{ + struct A {}; + template <typename T> + void make_reverse_iterator(T&&) {} +} // namespace test_ns + +void test() +{ + test_ns::A as[] = {{}, {}}; + auto v = as | std::views::reverse; + static_assert(std::ranges::view<decltype(v)>); + static_assert(std::ranges::view<const decltype(v)>);Was this tested? A view must be movable, which requires move-assignable. You can't assign to a const view, so const decltype(v) does not model movable so does not model view.Here's what I've committed. Thanks for the bugfix.
smime.p7s
Description: S/MIME Cryptographic Signature