"Now With More Salt" <co**************@yahoo.com> wrote in message
news:bk**********@news-int.gatech.edu...
Suppose I wanted to go about defining a three or four bit
unsigned integer type. How would I go about doing that?
You could use a bit field embedded in a struct, but it would
not be treated as an equal with the builtins and would not
be packed optimally. C++ doesn't really let you specify the
size of types in that amount of detail. The resolution for type
sizes is sizeof(char). However, if you specify the operations
you want to support, and the expectations you have for the
type, you might be able to cobble together something that is
suitable for your purposes.
Dave