Skip to content

[ranges] Introduce bidirectional-common and random-access-sized to simplify concept spelling #6654

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hewillk
Copy link
Contributor

@hewillk hewillk commented Nov 11, 2023

This is the resolution for #6633.
This PR moves bidirectional-common to [range.utility.helpers] also with slide-caches-nothing which renames it to random-access-sized:

template<class R>
  concept bidirectional-common = // exposition only
    bidirectional_range<R> && common_range<R>;
template<class R>
  concept random-access-sized = // exposition only
    random_access_range<R> && sized_range<R>;

Then replace them where they are used in [ranges].
I believe this is editorial, and it simplifies the spelling of a number of concepts without reducing readability, which is an improvement in my opinion.

And I think this also helps with the concept spelling for newly-introduced range adaptors.

Comments are welcome.

@jensmaurer jensmaurer added the not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. label Nov 11, 2023
hewillk and others added 2 commits November 11, 2023 22:32
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
@hewillk
Copy link
Contributor Author

hewillk commented Nov 11, 2023

Now this is entirely editorial, I think?
Not sure if those new \linebreak{}s are in the right place, but they look good to me.
Not sure if this PR will be accepted as it does change a lot, but I believe it is a worthwhile enhancement.

@jensmaurer jensmaurer removed the not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. label Nov 11, 2023
@jensmaurer
Copy link
Member

@jwakely @CaseyCarter , please have a look.

@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Dec 23, 2024
@frederick-vs-ja
Copy link
Contributor

P3179R9 introduced sized-random-access-range so perhaps we should rebase the changes onto it.

@hewillk
Copy link
Contributor Author

hewillk commented Jul 28, 2025

P3179R9 introduced sized-random-access-range so perhaps we should rebase the changes onto it.

I'm currently working on LWG for this.
bidirectional-common should be placed after sized-random-access-range as an exposition-only concept and renamed to common-bidirectional-range to match the current style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs rebase The pull request needs a git rebase to resolve merge conflicts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy