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

[std] Index specializations of range variable templates #5111

Merged
merged 9 commits into from
Aug 16, 2023

Conversation

JohelEGP
Copy link
Contributor

I plan to use this in my own documentation, so I hope to get feedback if this is desirable in the WD.

Before After

@jwakely
Copy link
Member

jwakely commented Nov 19, 2021

I like it.

source/ranges.tex Outdated Show resolved Hide resolved
@JohelEGP
Copy link
Contributor Author

Before rebase After rebase

source/macros.tex Outdated Show resolved Hide resolved
@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Jan 19, 2022
@JohelEGP
Copy link
Contributor Author

If someone can make a better macro, don't hesitate to take over.

@JohelEGP
Copy link
Contributor Author

It'd be simpler if indexing specializations followed the practice of the index of grammar productions. That is, the primary template and its specializations are listed in page order in a comma-separated list, with the former in bold font.
1650462046

@jensmaurer
Copy link
Member

We can do that, but that loses the information for which template argument something is specialized.

@JohelEGP JohelEGP force-pushed the index_range_var_specs branch 3 times, most recently from 3090846 to da20ac9 Compare April 20, 2022 15:36
@JohelEGP
Copy link
Contributor Author

According to diffpdf, there's no diff outside the index. The index diff looks like #5111 (comment), with entries linking to the page with the specialization.

I had to place the index macro after the template-head, as putting it on its own line is visible as an empty line in the PDF.

@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 22, 2022

I had to place the index macro after the template-head, as putting it on its own line is visible as an empty line in the PDF.

Even if you comment out the newline?

\index{...}%
template foo;

@JohelEGP
Copy link
Contributor Author

Yes.
1661189816

@JohelEGP
Copy link
Contributor Author

Current index:
1661206869
1661206828
1661206836
1661206848

@JohelEGP

This comment was marked as resolved.

@jensmaurer jensmaurer removed the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Mar 12, 2023
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 to me.

@jensmaurer
Copy link
Member

@jwakely , what do you think?

@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 16, 2023

Could you please update the first commit to a) use the usual commit message style, and b) to explain a bit more what the new macro does?

`\libspec{disable_sized_sentinel_for}{move_iterator}`
will index `move_iterator` under `disable_sized_sentinel_for`,
which is enough to uniquely identify
```C++
  template<class Iterator1, class Iterator2>
      requires (!sized_sentinel_for<Iterator1, Iterator2>)
    constexpr bool disable_sized_sentinel_for<move_iterator<Iterator1>,             // freestanding
                                              move_iterator<Iterator2>> = true;
```
@JohelEGP
Copy link
Contributor Author

Done (16b640e).

@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 16, 2023

Thanks!

@tkoeppe tkoeppe merged commit db97739 into cplusplus:main Aug 16, 2023
2 checks passed
@JohelEGP JohelEGP deleted the index_range_var_specs branch August 16, 2023 22:33
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.

5 participants