C++ Logo

std-proposals

Advanced search

[std-proposals] value-changing implicit conversions

From: Magnus Fromreide <magfr_at_[hidden]>
Date: Wed, 11 Dec 2024 18:45:44 +0100
On Tue, Dec 10, 2024 at 06:31:59PM -0500, Tom Honermann via Std-Proposals wrote:
> On 12/10/24 5:55 PM, Andrey Semashev via Std-Proposals wrote:

> > No, the fix is to resolve problems of poor interaction between signed
> > and unsigned integers in the language. And the OP doesn't propose that.
>
> We can't feasibly fix that in the core language (other than by providing
> some kind of opt-in like new types, epochs, or profiles).

But it still feels feasible to have a mode/profile/whatever where
value-changing implicit conversions are erraneous.

That feels like it could catch a lot of bugs, and not only in array indexing.

/MF

Received on 2024-12-11 17:45:48