
21 Nov
2004
21 Nov
'04
10:59 p.m.
Mathew Robertson wrote:
And they also tend to provide their own array, list, string and vector classes, instead of making use of those in the standard library. Not to mention, several provide their own bool!
There is a reason that several provide there own 'bool' - what is the official size of a bool? And more importantly, is it the same size on every platform (ie so that you can serailise on one latform, then deserailise on another) ?
sizeof(bool) can vary, but this gives you the storage bits. bool always has exactly one _value bit_, so it can be serialized portably as a char.