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

[range.elements.iterator]: Missing friend specifier for operator- prototype declarations #4156

Closed
Dani-Hub opened this issue Sep 8, 2020 · 0 comments · Fixed by #4158
Closed
Assignees

Comments

@Dani-Hub
Copy link
Member

Dani-Hub commented Sep 8, 2020

In the class template synopsis of elements_view::iterator we have ([range.elements.iterator]):

friend constexpr iterator operator-(const iterator & x, difference_type y)
  requires random_access_range<Base >;
friend constexpr difference_type operator-(const iterator & x, const iterator & y)
  requires random_access_range<Base >;

but in the corresponding prototype declarations [range.elements.iterator] p20+21 the friend specifier is missing:

constexpr iterator operator-(const iterator & x, difference_type y)
  requires random_access_range<Base >;
[...]
constexpr difference_type operator-(const iterator & x, const iterator & y)
  requires random_access_range<Base >;

For consistency with the other friend member prototypes (and with the current style used elsewhere) the two missing friend specifiers should be added for the prototype specifications in [range.elements.iterator] p20+21.

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

Successfully merging a pull request may close this issue.

2 participants