-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi Hui,
I was reading your wonderful paper recently and found a potential issue here:
cpp_papers/impl/concat/concat.hpp
Lines 355 to 359 in c97f7c5
| constexpr iterator(iterator<!Const> i) | |
| requires Const && (convertible_to<iterator_t<Views>, iterator_t<const Views>> && ...) | |
| // [TODO] noexcept specs? | |
| : parent_{i.parent_} | |
| , it_{std::move(i.it_)} {} |
Using variant<Bs...> to initialize variant<As...> seems not work here, because std::variant does not have a constructor that accepts the heterogeneous sibling like range-v3 variant. The following seems can fix it:
constexpr iterator(iterator<!Const> i)
requires Const && (convertible_to<iterator_t<Views>, iterator_t<const Views>> && ...)
// [TODO] noexcept specs?
: parent_{i.parent_}
, it_{
xo::visit_i(
std::move(i.it_),
[](auto I, auto it) {
return decltype(it_)(in_place_index<I>, std::move(it));
})
} {}Thanks again for your contributions, I really like this view.
Metadata
Metadata
Assignees
Labels
No labels