Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US294 24.07.10.3 p14,15 join_view::iterator::operator-- is improperly constrained LWG 3313 #290

Closed
wg21bot opened this issue Oct 24, 2019 · 2 comments · Fixed by cplusplus/draft#3748
Labels
accepted LWG Library ranges std::ranges
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 24, 2019

join_view::iterator::operator-- is improperly constrained. In the Effects clause in paragraph 14, we see the statement:

  inner_ = ranges::end(*--outer_);

However, this only well-formed when end returns an iterator, not a sentinel. This requirement is not reflected in the constraints of the function(s). 

Proposed change:
Change join_view::iterator::operator--() and operator--(int) to the following:

constexpr iterator& operator--()
requires ref_is_glvalue && bidirectional_range<Base> &&
bidirectional_range<range_reference_t<Base>> &&
common_range<range_reference_t<Base>>;

constexpr iterator operator--(int)
requires ref_is_glvalue && bidirectional_range<Base> &&
bidirectional_range<range_reference_t<Base>> &&
common_range<range_reference_t<Base>>;
@wg21bot wg21bot added the LWG Library label Oct 24, 2019
@wg21bot wg21bot changed the title US294 24.07.10.3 p14,15 US294 24.07.10.3 p14,15 join_view::iterator::operator-- is improperly constrained Oct 24, 2019
@wg21bot wg21bot added the ranges std::ranges label Oct 25, 2019
@Dani-Hub
Copy link
Member

Dani-Hub commented Nov 4, 2019

The associated issue is LWG 3313

@JeffGarland
Copy link
Member

Status to Ready during Tuesday morning issue processing in Belfast

@jensmaurer jensmaurer changed the title US294 24.07.10.3 p14,15 join_view::iterator::operator-- is improperly constrained US294 24.07.10.3 p14,15 join_view::iterator::operator-- is improperly constrained LWG 3313 Nov 7, 2019
@mclow mclow added the accepted label Jan 31, 2020
@jensmaurer jensmaurer added this to the CD C++20 milestone Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted LWG Library ranges std::ranges
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants