Question Details

No question body available.

Tags

c++ c++26

Answers (1)

June 12, 2026 Score: 1 Rep: 11 Quality: Low Completeness: 50%

CHARBIT means number of bits in a byte, while CHARWIDTH means width of the char type.

For char, both are always the same because a byte is defined as the size of char:

CHARBIT == CHARWIDTH

CHARWIDTH was added in C++26 mainly for consistency with other macros like INTWIDTH, LONG_WIDTH, etc., making generic programming cleaner.