How do I get the number of bits in type char
?
I know about CHAR_BIT
from climits
. This is described as »The macro yields the maximum value for the number of bits used to represent an object of type char.« at Dikumware's C Reference. I understand that means the number of bits in a char
, doesn't it?
Can I get the same result with std::numeric_limits
somehow? std::numeric_limits<char>::digits
returns 7
correctly but unfortunately, because this value respects the signedness of the 8-bit char here…