[libc++] Explicitly reject `uniform_int_distribution<bool>` and `<char>`.
`uniform_int_distribution<T>` is UB unless `T` is one of the non-character, non-boolean integer types (`short` or larger). However, libc++ has never enforced this. D114129 accidentally made `uniform_int_distribution<bool>` into an error. Make it now *intentionally* an error; and likewise for the character types and all user-defined class and enum types; but permit `__[u]int128_t` to continue working. Apply the same static_assert to all the integer distributions. Differential Revision: https://reviews.llvm.org/D114920
Loading
Please register or sign in to comment