Skip to content

P3899 Removes UB for pointer subtraction #222

@eisenwave

Description

@eisenwave

Since arithmetic expressions are defined to have operands of arithmetic types, the UB of pointer subtraction called out in https://eel.is/c++draft/expr.add#note-2 would inadvertently go away.

The fix is probably to use "scalar type" or to be explicit about pointer subtraction UB in [expr.add].

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions