mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 00:50:35 +00:00
While debugging legacy_compound_view, I noticed that it cannot be used as a C++20 std::ranges::input_range because it is missing some trivial methods. So let's fix this, and make the life of future developers a little bit easier. The two trivial methods we need to implement: 1. A postfix increment operator. We already had a prefix increment operator, but the C++20 concept weakly_iterable also needs postfix. 2. By mistake (this will be corrected in https://wg21.link/P2325R3), weakly_iterable also required the default_initialized concept, so our iterator type also needs a default constructor. We'll never actually use this silly constructor, and when this C++20 standard mistake is corrected, we can remove this constructor. After this patch, a legacy_compound_view is accepted for the C++20 ranges::input_range concept. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
23 KiB
23 KiB