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

[string.iterators] should be removed as basic_string is a reversible container #6222

Open
AlisdairM opened this issue Apr 4, 2023 · 2 comments

Comments

@AlisdairM
Copy link
Contributor

basic_string is a contiguous container, so subject to the specification for containers and reversible containers.

The container and reversible container requirements provide a more specific specification for everything in [string.iteartors], such as complexity constraints. All the other containers rely on the requirements for their documentation, and so should basic_string, otherwise it might be (foolishly) argued that by providing an alternate specification, there are no complexity requirements on these operations!

There are several more string member specifications that might be usefully removed, but there are many that do have reasons for their separate spec, so I will follow up further de-specifying string only if this issue is accepted.

@AlisdairM
Copy link
Contributor Author

This issue should not be considered before we open up for C++26 editorial issues.

@Eisenwave
Copy link
Contributor

This is not editorial, as it turns out.

I have proposed in LWG4029 to remove [string.iterators] but maybe a different solution can be found.

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

No branches or pull requests

2 participants