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

[reverse.iter.cons] Indent consistently with the parent subclause #2578

Merged
merged 1 commit into from Jan 19, 2019

Conversation

JohelEGP
Copy link
Contributor

@JohelEGP JohelEGP commented Dec 8, 2018

No description provided.

@JohelEGP JohelEGP changed the title [reverse.iterator] Remove backslashes in codeblock [reverse.iterators] Various editorial fixes Dec 8, 2018
@JohelEGP
Copy link
Contributor Author

JohelEGP commented Dec 8, 2018

Barring other changes to [iterators], this is ready.

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 8, 2018

Thanks, I've rearranged the commits a bit, please rebase.

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@jensmaurer jensmaurer added the tiny An issue with a small change; with "cwg" label: can be applied editorially after CWG consent. label Dec 19, 2018
@jensmaurer
Copy link
Member

@tkoeppe, seems this is ready to go.

inline constexpr bool disable_sized_sentinel<reverse_iterator<Iterator1>,
reverse_iterator<Iterator2>> = true;
requires (!SizedSentinel<Iterator1, Iterator2>)
inline constexpr bool disable_sized_sentinel<reverse_iterator<Iterator1>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing indentation is correct:

  • the requires clause should be indented 2 spaces from the line it's continuing (the template-head)
  • the variable declaration is a definition, so does not need indentation.

This style would also be acceptable, but is generally used only for non-defining declarations:

template<class Iterator1, class Iterator2>
  requires (!SizedSentinel<Iterator1, Iterator2>)
  inline constexpr bool disable_sized_sentinel<reverse_iterator<Iterator1>,
                                               reverse_iterator<Iterator2>> = true;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped that commit.

@JohelEGP JohelEGP changed the title [reverse.iterators] Various editorial fixes [reverse.iter.cons] Indent consistently with the parent subclause Dec 20, 2018
@zygoloid zygoloid merged commit 0cbd152 into cplusplus:master Jan 19, 2019
@JohelEGP JohelEGP deleted the iter_reverse branch January 19, 2019 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tiny An issue with a small change; with "cwg" label: can be applied editorially after CWG consent.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants