Skip to content

P3349R1 Converting Contiguous Iterators To Pointers #5295

@StephanTLavavej

Description

@StephanTLavavej

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cxx26C++26 feature

    Type

    No type

    Projects

    Status

    Reviewing PR

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions