[Qt5-feedback] Real 64 Bit support ?

Yves Bailly yves.bailly at sescoi.fr
Thu May 12 15:26:03 CEST 2011


Le 12/05/2011 15:13, Konstantin Tokarev a écrit :
>> Data exchange implies serializing things in a very controlled way, isn't it?
>> I avoid sending a mere "int" through a QDataStream, I always cast it to a
>> known-size type, e.g. int32_t or int64_t (depending on the needs). I would
>> treat "size_t" just the same way, so no data exchange problem.
>
> O rly? size_t is different on different platforms!

That's precisely why I would always cast it in a very controlled way to a
known type of which I know the (cross-platform) size, just as I would do
with the good'old "int" ;-)

But in the code that *uses* size_t, its actual size is (most of the time)
not really important. The size really matters when there's data exchange,
writing to a file, sending to a stream or whatever. When it's used to index
things (assuming you're not numbering earth's atoms and you're not eating
GBs of RAM), then its size is not really important.

-- 
      /- Yves Bailly - Software developper  -\
      \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."


More information about the Qt5-feedback mailing list