From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2007-11-14 03:11:44
John Maddock wrote:
> So... it's a data alignment error: I wonder are you trying to write to
> integer on a char boundary or something?
John, thanks for your help.
I believe this is indeed the problem. GIL needs to read/write a type
bigger than a byte that starts at a char* address, so it is possibly not
One approach is to special-case platforms which cannot dereference at a
non-byte boundary (I couldn't find a config flag that detects this,
anyone?) and provide a special solution for such platforms. The solution
I imagine will involve static recursion that reads/writes each byte and
shifts it in place.
Is there such a code in Boost? My search resulted only in references to
a "Boost.Endian" proposal by Darin Adler / Beman Dawes but I couldn't
find the code and I don't know if it has a solution to the above