Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Summary of discussion #1
From: Terry Golubiewski (tjgolubi_at_[hidden])
Date: 2010-06-03 12:35:04


John Bytheway wrote:
>> endian::cast<big_to_host>() //explicit direction
>> endian::cast<from_litle>() //"to_host" is implicit
>> endian::cast<to_big>() //"from_host" is implicit
>>
>> I actually really like that. What do you think?
>
> Yes! I do like that. For the out-of-place version, I think this is
> definitely better than the swap-based names.

I don't think the function should use "cast" because the return type and
parameter type are the same.
I don't think the function name should use "swap" either because that is an
implementation detail.
Perhaps endian_transform or endian_convert instead?

terry


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