Closed yurivict closed 1 year ago
Thanks for reporting this, it is indeed an issue (although not one that has been triggered with any of our compiler tests internally).
std::uniform_int_distribution
does indeed require that its IntType
be one of short, int, long, long long, unsigned short, unsigned int, unsigned long, or unsigned long long
or the behavior is undefined; presumably throwing an error during compilation when given a type not in the list is perfectly compliant with this.
Sadly, this is different from the set of types that std::is_integral
defines to be integers (which is what we currently rely on). This seems silly to me (and also to other people, but it's apparently not a defect and fixing it needs to be done in a feature request), but the standard is what the standard is. Based on the list of types we dispatch to, char
, schar
(signed char
), and uchar
(unsigned char
) are probably broken. (For whatever reason, we don't dispatch to bool
. Edit: Probably because none of our backends actually support this, and several underlying libraries don't, either.)
I will fix this soon.
Edit: Also, this issue has presumably been present ever since we put together this testing framework, since this bit of code hasn't changed in three years. Presumably some standard library developer decided to be more strict.
I believe this is now fixed in the latest v1.4.1 release. Please reopen if not. Thanks!
clang-15 FreeBSD 13.2