C++ Logo

std-proposals

Advanced search

[std-proposals] D4037R0 Allowing signed char and unsigned char in random number generation

From: Jan Schultke <janschultke_at_[hidden]>
Date: Thu, 26 Feb 2026 17:44:06 +0100
Hi,

I'm working on another proposal that may likely be a "slam dunk":
https://isocpp.org/files/papers/D4037R0.html

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 previously attempted the same,
but was closed as NAD because it was considered a feature request.

I'm mainly posting here to see if anyone has some historical context into
why this was ever disallowed, or in case someone has a good reason not to
allow it now; I don't see any good reason.


Jan

Received on 2026-02-26 16:44:20