Date: Thu, 26 Feb 2026 17:59:09 +0100
On 26/02/2026 17:44, Jan Schultke via Std-Proposals wrote:
> In short, this allows std::uniform_int_distribution<unsigned char> and
> such things, which is currently IFNDR/compile-time UB. https://
> cplusplus.github.io/LWG/issue2326 <https://cplusplus.github.io/LWG/
> issue2326> previously attempted the same, but was closed as NAD because
> it was considered a feature request.
I think yes, this should be a slam-dunk.
Would it make sense to say that it's implementation-defined whether
extended integer types are supported (by each template in [rand], that
is), rather jumping straight into UB? Aim is to reduce the surface of
gratuitous UB (UB that may just work⢠on certain implementations so why
not make it official.)
Thank you,
--
Giuseppe D'Angelo
> In short, this allows std::uniform_int_distribution<unsigned char> and
> such things, which is currently IFNDR/compile-time UB. https://
> cplusplus.github.io/LWG/issue2326 <https://cplusplus.github.io/LWG/
> issue2326> previously attempted the same, but was closed as NAD because
> it was considered a feature request.
I think yes, this should be a slam-dunk.
Would it make sense to say that it's implementation-defined whether
extended integer types are supported (by each template in [rand], that
is), rather jumping straight into UB? Aim is to reduce the surface of
gratuitous UB (UB that may just work⢠on certain implementations so why
not make it official.)
Thank you,
--
Giuseppe D'Angelo
Received on 2026-02-26 16:59:15
