Re: Byteswapping floating point types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 14, 2009, at 9:16 PM, David Hagood wrote:

I'd take it one step further, and make the byteswapped objects their own types:


I agree, this is a good idea. However I think my co-worker would argue against the additional overhead and in favor of the ease of use of a simple function template. It seems we both feel that his idea isn't safe though ;)

Have you looked at Beman Dawes's preposed Boost.Endian library? It seems like it might be quite useful in writing a "swapped" type.

The other alternative is to simply return a byte-array (or vector or deque or whatever), but that's less featureful than a swapped type could be.

--
Andrew Troschinetz
(512) 835-3410
Applied Research Laboratories


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux