C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Signed sizes

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 10 Dec 2024 12:01:34 -0300
On Tuesday 10 December 2024 03:32:15 Brasilia Standard Time Tiago Freire via
Std-Proposals wrote:
> While indexing very high values is dubiously wrong, indexing negative values
> is unquestionably wrong.

Except where it isn't and negative indices have a "count from the end" meaning
or an API can return a negative value to indicate "item not found". Whether
that is good API or not we can debate, but those API exist.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-12-10 15:01:40