Boost logo

Boost :

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

Tom 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?

Is it imporant that these names are templated? What are the advantages of
this templated-tagged design over..


where the functions are only templated on the object type.

template<class T>
T cast_big_to_host(const T& x);

template<class T>
T cast_from_big(const T& x) { return cast_bit_to_host(x); }

Although, I strongly disagree with T both as an argument and as a return
value of a "cast".


Boost list run by bdawes at, gregod at, cpdaniel at, john at