Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-06-15 15:11:54


On 6/15/05, David Abrahams <dave_at_[hidden]> wrote:
> Caleb Epstein <caleb.epstein_at_[hidden]> writes:
>
> > On 6/15/05, Iain K. Hanson <iain.hanson_at_[hidden]> wrote:
> >
> >> I think this would be a very useful addition for networking. Should it
> >> go in utility? I'd prefer not to have it in detail.
> >
> > I added it to detail, where I think it should stay until 1.33 goes out
> > the door. We can move it someplace more suitable after that.
> >
> > Does this make sense?
>
> Is it (whatever it is) an implementation detail or just a prerelease
> feature? If the latter, detail:: is the wrong feature. Maybe
> prerelease:: ?

Well, "it" is just two macros: BOOST_BYTE_ORDER and one of
BOOST_BIG_ENDIAN, BOOST_LITTLE_ENDIAN or BOOST_PDP_ENDIAN depending on
your target CPU.

The BOOST_*_ENDIAN macros are (currently) only needed to fix the
serialization test test_demo_portable_archive on big-endian platforms
and to tailor <boost/detail/limits.hpp> to a given architecture. I
added BOOST_BYTE_ORDER myself for completeness.

I put the header file into boost/detail because:

* Thats where the initial implementation, lifted from
<boost/detail/limits.hpp> was
* I didn't know what the right place for a utility header like this
would be. Perhaps <boost/utility/endian.hpp> as per Iain's
suggestion.
* I didn't want to expose this header publicly (*yet*) as I thought
this might be construed as adding a feature during the release cycle.

I'd be more than happy to move this code someplace more suitable, just
let me know where.

-- 
Caleb Epstein
caleb dot epstein at gmail dot com

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