Subject: Re: [boost] [boost::endian] Summary of discussion #1
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-06-02 14:20:36
On 2 June 2010 13:25, Stewart, Robert <Robert.Stewart_at_[hidden]> wrote:
> If all I wanted was two values, I wouldn't swap the entire header. Â I would do exactly what you discounted parenthetically, so the typed approach is not more efficient, it's overkill in your example.
The difference is in the error-prone-ness.
With the typed one, it's free for me to type pun it, and then I pay
for what I actually read. With swapping, I have a choice of swapping
everything, and paying for the ones I don't use, or of only swapping
the ones I do use, and risk either forgetting to swap before reading
or accidentally swapping twice if I read it twice.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk