|
Boost : |
From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2000-11-16 13:32:15
>my "angle of attack" on this problem.
I was thinking along the line of having a full set of operators, which if
you selected "arithmetic<native>" "input<BigEndian>" "output<LittleEndian>"
traits would do conversion on operator>>, and operator<<, or you could
select "arithmetic<big_endian>" "input<native> output<native>", or some
combination of these. and it would do it that way instead. It would rely on
a compiler to optimize all the inline operators away. The library code would
be fairly complex, but the usage would be simple, just replace the types and
specify the usage. Addition of new formats would be done with the addition
of new traits templates. With a good design it would be a linear increase in
code, not an exponential one.
-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