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

[ranges] Mark exposition-only names as kebab-case. #3559

Merged
merged 1 commit into from Dec 16, 2019

Conversation

jensmaurer
Copy link
Member

Fixes #3097.

@JohelEGP
Copy link
Contributor

I'm still preparing a review.

Copy link
Contributor

@JohelEGP JohelEGP left a comment

Choose a reason for hiding this comment

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

@jensmaurer

The \rSecs and \refs are missing these changes.

noexcept(noexcept(ranges::iter_move(i.@\exposid{current_}@)));
friend constexpr void iter_swap(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y)
noexcept(noexcept(ranges::iter_swap(x.@\exposid{current_}@, y.@\exposid{current_}@)))
requires indirectly_swappable<@\exposid{iterator}@_t<V>>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
requires indirectly_swappable<@\exposid{iterator}@_t<V>>;
requires indirectly_swappable<iterator_t<V>>;

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
Initializes \tcode{end_} with \tcode{ranges::end(parent.base_)}.
Initializes \exposid{end_} with \tcode{ranges::end(\exposid{parent_}.\exposid{base_})}.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Initializes \exposid{end_} with \tcode{ranges::end(\exposid{parent_}.\exposid{base_})}.
Initializes \exposid{end_} with \tcode{ranges::end(parent.\exposid{base_})}.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

requires Const && convertible_to<iterator_t<V>, iterator_t<Base>>;
@\exposid{iterator}@() = default;
constexpr @\exposid{iterator}@(@\exposid{Parent}@& parent, iterator_t<@\exposid{Base}@> current);
constexpr @\exposid{iterator}@(iterator<!Const> i)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
constexpr @\exposid{iterator}@(iterator<!Const> i)
constexpr @\exposid{iterator}@(@\exposid{iterator}<!Const> i)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

using CI = counted_iterator<iterator_t<Base>>; // \expos
sentinel_t<Base> end_ = sentinel_t<Base>(); // \expos
using @\exposid{Base}@ = conditional_t<Const, const V, V>; // \expos
using CI = counted_iterator<iterator_t<@\exposid{Base}@>>; // \expos
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
using CI = counted_iterator<iterator_t<@\exposid{Base}@>>; // \expos
using @\exposid{CI}@ = counted_iterator<iterator_t<@\exposid{Base}@>>; // \expos

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

V base_; // \expos
@\placeholder{semiregular-box}@<Pred> pred_; @\itcorr[-1]@ // \expos
V @\exposid{base_}@; // \expos
@\placeholder{semiregular-box}@<Pred> @\exposid{pred_}@; @\itcorr[-1]@ // \expos
Copy link
Contributor

Choose a reason for hiding this comment

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

Is @\itcorr[-1]@ still correct here? I assume it was put there to change how the italicized semiregular-box looks, and I'm wondering if it accidentally affects how pred_ looks.

There is one other such occurrence in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is trying to align the comment that follows with the other comments in the surroundings. This is still substantially broken, but likely benefits from a more holistic approach. Not now.


\pnum
\effects
Equivalent to:
\begin{codeblock}
*parent_->stream >> parent_->object_;
*@\exposid{parent_}@->stream >> @\exposid{parent_}@->@\exposid{object_}@;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
*@\exposid{parent_}@->stream >> @\exposid{parent_}@->@\exposid{object_}@;
*@\exposid{parent_}@->@\exposid{stream_}@ >> @\exposid{parent_}@->@\exposid{object_}@;

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

return *this;
\end{codeblock}
\item Otherwise,
\begin{codeblock}
ranges::advance(begin_, n, end_);
ranges::advance(begin_, n, @\exposid{end_}@);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ranges::advance(begin_, n, @\exposid{end_}@);
ranges::advance(@\exposid{begin_}@, n, @\exposid{end_}@);

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

\begin{codeblock}
auto d = n - ranges::advance(begin_, n, end_);
auto d = n - ranges::advance(begin_, n, @\exposid{end_}@);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
auto d = n - ranges::advance(begin_, n, @\exposid{end_}@);
auto d = n - ranges::advance(\exposid{begin_}, n, @\exposid{end_}@);

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.


friend constexpr bool operator==(const CI& y, const sentinel& x);
friend constexpr bool operator==(const CI& y, const @\exposid{sentinel}@& x);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
friend constexpr bool operator==(const CI& y, const @\exposid{sentinel}@& x);
friend constexpr bool operator==(const @\exposid{CI}@& y, const @\exposid{sentinel}@& x);

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

\end{itemdescr}

\indexlibrarymember{operator==}{take_view::sentinel}%
\begin{itemdecl}
friend constexpr bool operator==(const CI& y, const sentinel& x);
friend constexpr bool operator==(const CI& y, const @\exposid{sentinel}@& x);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
friend constexpr bool operator==(const CI& y, const @\exposid{sentinel}@& x);
friend constexpr bool operator==(const @\exposid{CI}@& y, const @\exposid{sentinel}@& x);

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

@JohelEGP JohelEGP left a comment

Choose a reason for hiding this comment

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

@jensmaurer

The \rSecs and \refs are missing these changes.

@jensmaurer
Copy link
Member Author

Fixes are in #3562.

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 this pull request may close these issues.

kebab-case all the exposition only ranges types
3 participants