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

P3349R1 Converting Contiguous Iterators To Pointers #5295

Open
StephanTLavavej opened this issue Feb 17, 2025 · 0 comments
Open

P3349R1 Converting Contiguous Iterators To Pointers #5295

StephanTLavavej opened this issue Feb 17, 2025 · 0 comments
Labels
cxx26 C++26 feature

Comments

@StephanTLavavej
Copy link
Member

WG21-P3349R1 Converting Contiguous Iterators To Pointers

No feature-test macro is mentioned.

We can accept PRs to implement and test this change unconditionally. This mostly just limits what users can rely on, but there's an exception as the paper notes:

The wording in this R1 revision requires the library to perform i+n on the original iterator (not only on a pointer to_address(i)), which gives the iterator a chance to check for a bounds overrun.

I believe we're good about this bounds check in debug mode, but I suspect that we don't always conform to this new requirement for implementers in release mode.

@StephanTLavavej StephanTLavavej added the cxx26 C++26 feature label Feb 17, 2025
@github-project-automation github-project-automation bot moved this to Unimplemented in STL C++26 Features Feb 17, 2025
@StephanTLavavej StephanTLavavej moved this from Unimplemented to Available in STL C++26 Features Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx26 C++26 feature
Projects
Status: Available
Development

No branches or pull requests

1 participant