Date: Wed, 28 Oct 2026 23:51:36 +0100
On Wednesday, 28 October 2026 14:42:24 Central European Standard Time
Sebastian Wittmeier via Std-Proposals wrote:
> E.g. some pre-condition: ptr != nullptr && ptr != NULL
>
> Or: belong_to_same_allocation(ptr_begin, ptr_end)
Or distance(end, begin) >= 0
Which would be UB if end and begin don't belong to the same iteration range in
the first place, but needs to be carefully scoped so this isn't run for
input_iterators with a runtime precondition check.
Plus, we don't yet have contracts.
Sebastian Wittmeier via Std-Proposals wrote:
> E.g. some pre-condition: ptr != nullptr && ptr != NULL
>
> Or: belong_to_same_allocation(ptr_begin, ptr_end)
Or distance(end, begin) >= 0
Which would be UB if end and begin don't belong to the same iteration range in
the first place, but needs to be carefully scoped so this isn't run for
input_iterators with a runtime precondition check.
Plus, we don't yet have contracts.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-10-28 22:51:47
