Boost logo

Boost Users :

From: Graham Reitz (graham.cpp_at_[hidden])
Date: 2008-05-29 16:11:20


This is very nice.

Thanks Beman, Scott, and other contributors to this!

I am coding it up right now. This will really, really help.

Do you mean std::copy in <algorithm>?

graham

On Thu, May 29, 2008 at 1:37 PM, Scott McMurray <me22.ca+boost_at_[hidden]> wrote:
> On Thu, May 29, 2008 at 2:19 PM, Graham Reitz <graham.cpp_at_[hidden]> wrote:
>>
>> ...would like to convert to this in a C++'ish style using a boost
>> facility if it exists: (or consider directing me somewhere else if it
>> doesn't)
>>
>
> There isn't at the moment.
>
> However, Beman Dawes has recently updated his proposed Boost.Endian
> library (http://tinyurl.com/4bswsh), and there is a discussion about
> it over on the dev list
> (http://lists.boost.org/Archives/boost/2008/05/137820.php and
> followups).
>
> It would allow you to say (something like)
>
> struct // or class
> {
> boost::endian::uint_t<16, boost::endian::big_endian> first;
> boost::endian::uint_t<32, boost::endian::big_endian> second;
> } data;
>
> Which you could then std::copy your data into (through char*s), and
> use the implicit conversions to get native integral types out.
>
> HTH,
> ~ Scott
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net