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

[iterator.traits] Redundant required expression in cpp17-input-iterator #2816

Closed
JohelEGP opened this issue Apr 4, 2019 · 1 comment
Closed
Assignees

Comments

@JohelEGP
Copy link
Contributor

JohelEGP commented Apr 4, 2019

With cpp17-iterator requiring

{ *i++ } -> @\placeholder{can-reference}@;

isn't cpp17-input-iterator's requirement redundant?

Whole definitions:

draft/source/iterators.tex

Lines 854 to 873 in 8d238bd

template<class I>
concept @\placeholder{cpp17-iterator}@ =
Copyable<I> && requires(I i) {
{ *i } -> @\placeholder{can-reference}@;
{ ++i } -> Same<I&>;
{ *i++ } -> @\placeholder{can-reference}@;
};
template<class I>
concept @\placeholder{cpp17-input-iterator}@ =
@\placeholder{cpp17-iterator}@<I> && EqualityComparable<I> && requires(I i) {
typename incrementable_traits<I>::difference_type;
typename readable_traits<I>::value_type;
typename common_reference_t<iter_reference_t<I>&&,
typename readable_traits<I>::value_type&>;
*i++;
typename common_reference_t<decltype(*i++)&&,
typename readable_traits<I>::value_type&>;
requires SignedIntegral<typename incrementable_traits<I>::difference_type>;
};

@CaseyCarter
Copy link
Contributor

isn't cpp17-input-iterator's requirement redundant?

Yes, it is. Good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants