Boost logo

Boost :

Subject: [boost] structure alignment
From: Christoph Macheiner (Christoph.Macheiner_at_[hidden])
Date: 2009-05-12 15:09:06


(Long-time reader, first-time poster)

Hi all

Recently I wanted to upgrade from 1.33 and got build errors in boost
format. It is a quite large codebase which, for legacy reasons, has to
be built with 1-byte structure alignment (this cannot easily be
changed). The error comes from an
boost::optional<boost::io::detail::locale_t> in
boost/format/internal.hpp that wants to be 4-byte aligned (platform is
Win32 vc9). Now I cannot just include this (or all) boost headers with
4- (or 8-)byte alignment because they include other std headers which
have already been included before (with 1-byte alignment). Is there an
easy solution to this that I am missing despite changing all includes?
Is there information on such interdependencies somewhere? Or do I have
to bite the bullet and include all standard headers with a suitable
alignment. I am sorry if this has been discussed before, but I could not
find anything.

Thanks, Christoph.


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