C++ Logo

std-proposals

Advanced search

[std-proposals] Integer overflow arithmetic with exceptions

From: Hans Åberg <haberg_1_at_[hidden]>
Date: Thu, 3 Apr 2025 10:48:01 +0200
Might it be possible to extend the proposal “Integer overflow arithmetic” (below), enabling throwing exceptions for overflows in the case the CPU supports it? The purpose is to enable constructing a type with performance in the absence of overflow approaching that of the built-in integral types, switching to higher precision when there is, and it is not possible to get high performance by conditional checks within the C++ language.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3161r2.html
https://lists.isocpp.org/std-proposals/2024/02/9079.php

Received on 2025-04-03 08:48:20