[xsd-users] Minor issue: debug printing of byte and unsignedByte
Ray Lischner
rlischner at proteus-technologies.com
Thu Mar 15 12:16:37 EDT 2007
Overloading operator<<(ostream&, x) is a nice feature for quick debugging and dumping of data. The only problem arises with elements of type byte or unsignedByte.Naturally, Code Synthesis maps these to signed char and unsigned char, but the standard ostream class (incorrectly, in my opinion) prints these types as though they were characters, not integers. It would be better for Code Synthesis to insert a static_cast to int or unsigned int prior to streaming byte and unsignedByte values to basic_ostream. (Of course, custom stream insertion should leave the types alone, to let the stream class handle them correctly.)
--
Ray Lischner, Proteus Technologies
More information about the xsd-users
mailing list