The following template free-function is useful for displaying some helpful type information such as sizeof, min, and max. This is essential information when porting a 32 bit application to 64 bit.
There are of course some limitations to this, and so we will have to specialize. Since we are looking for numeric values here and the ostream object will be using its default operator<< overload, we will have to rewrite how it treats char and unsigned char data types so they are displayes as numbers and the character representations of those numbers. With this in mind, we have the following two specialized functions:
Prior to being passed into the cout stream, we have to cast these as int (for char) and unsigned int (for unsigned char) so the streams class will display the correct values.