Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Request for comments/interest
From: Tomas Puverle (tomas.puverle_at_[hidden])
Date: 2010-05-26 15:43:43


Hi Rob

Thanks for the positive comments.

> I have
> versions that return a swapped copy of the input and those that take a
non-const reference to a destination

That is precisely the purpose for swap<>() and swap_in_place<>()

> > - endian::iterator, which will iterate across a range
> > swapping values as necessary. It works with any swappable
> > type.
>
> Nice idea!

I find it very useful when reading memory-mapped binary files containing aligned
homogeneous data. Also, if the data is already in the order you need, the
iterator factory simply returns the original iterator, meaning it's zero cost in
that case.

I look forward to any further questions/comments you may have.

Tom


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