lundi 24 février 2020

Why are signed/unsigned 8-bit integer types not supported by C++ random number generation?

From C++11 §26.5.1.1 on the requirements for random number generation:

Throughout this subclause 26.5, the effect of instantiating a template: [...] that has a template type parameter named IntType is undefined unless the corresponding template argument is cv-unqualified and is one of short, int, long, long long, unsigned short, unsigned int, unsigned long, or unsigned long long.

What is the reason that 8-bit signed/unsigned types are excluded from random number generation like this in the requirements?




Aucun commentaire:

Enregistrer un commentaire