Is there some type trait that checks, if one integral type can hold value of other integral type without data loss?
For example int32_t
might hold uint16_t
, uint8_t
, int32_t
, int16_t
and int8_t
.
However int32_t
can not hold uint32_t
, nor uint64_t
or int64_t
.
Aucun commentaire:
Enregistrer un commentaire