Skip to content

Commit

Permalink
concat remove maybe_const in iterator ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
huixie90 committed Jun 5, 2023
1 parent 3bbd18b commit 8b26829
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion concat.lwg.feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
[Done] instead of ranges::size this should be ranges::distance and we don't need the static_cast.
[Done] all the steps need to cast to that iterator's difference_type
[Done] al the steps need to be cast to range::diffence_type
[Done] the use of maybe-const on the requirement of the constructor: I think we removed them elsewhere as we Const is true

# Todos

Expand All @@ -36,7 +37,6 @@
[TODO] OK, we can keep it as is but I prefer <
[TODO] do we want to avoid emplacing ranges we don't need to use?
[TODO] explain why this is over-constrained
[TODO] the use of maybe-const on the requirement of the constructor: I think we removed them elsewhere as we Const is true
[TODO] for op*() p10 can use concat_reference_t
[TODO] we don't need the preconditions: they come from the "Equivalent to:" => strike p13 and p15
[TODO] you need p17 but you can rid of p19
Expand Down
2 changes: 1 addition & 1 deletion concat.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ namespace std::ranges{

constexpr @_iterator_@(@_iterator_@<!Const> i)
requires Const &&
(convertible_to<iterator_t<Views>, iterator_t<@_maybe-const_@<Const, Views>>>&&...);
(convertible_to<iterator_t<Views>, iterator_t<const Views>> && ...);

constexpr decltype(auto) operator*() const;

Expand Down
2 changes: 1 addition & 1 deletion impl/concat/concat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class concat_view : public view_interface<concat_view<Views...>> {


constexpr iterator(iterator<!Const> i) requires Const &&
(convertible_to<iterator_t<Views>, iterator_t<__maybe_const<Const, Views>>>&&...)
(convertible_to<iterator_t<Views>, iterator_t<const Views>> && ...)
// [TODO] noexcept specs?
: parent_{i.parent_}
, it_{std::move(i.it_)} {}
Expand Down

0 comments on commit 8b26829

Please sign in to comment.