Alberto Massari wrote:
At 12.04 24/07/2007 +0300, Vitaly Prapirny wrote:
Hi Alberto,
Alberto Massari wrote:
the change was intentional; XMLSize_t should be used when dealing
with a number that expresses the size of a memory buffer (i.e. it
complements a pointer), while unsigned int/unsigned long are to be
used when expressing standalone numbers (i.e. the number of items in
a vector/list, the line/column number).
The number of items in a container is the size of it, isn't it?
That's an implementation decision; the fact is that its meaning is
"count of items" instead of "size of buffer".
size of buffer - count of bytes in a buffer
size of container - count of items in a container
STL uses name "size_type" in the same case. So I should remark that size
exists not only for buffers :) Though I can live with current
implementation.
The only doubt is if we want to store more than 4 billion items in a
vector on 64-bit platforms; in this case, unsigned long should be used.
AFAIK long is 32-bit on Visual C++ in 64-bit mode in contrast to g++.
Good luck!
Vitaly
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]