Boost logo

Boost :

From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2000-11-16 13:13:13


> (or at least me) see them as representation holders useful
> > for I/O but to be converted to built-in types for any arithmetic
> > operations.
>
In a previous life the project I worked on did portable data this way. The
reason was the project was very CPU intensive so conversion once on read,
and again on write was preferred. We picked the format that was most common
to the machines we had. At the time I think it was the Sun format.

We also did a "portable" floating point number scheme as well. That worked
reasonably well, once I figured out what those formats were. I used bit
fields to do the conversions.

The games I've done for multiplayer also have this problem, and we nearly
always just pick a most common format, (PC) and make the rest convert on
TCP/IP data exchange, but file IO is done in the native format.

So yes this would be a very useful addition to boost. And I don't see how
boost could pick the format, it would have to be compile time specific.
Perhaps using traits?

  -gary-

gary.powell_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk