Boost logo

Boost Users :

Subject: [Boost-users] [Format] Asserts with non-default structure packing in 1.37 (MSVC)
From: Daniel James (gmane.junk001_at_[hidden])
Date: 2008-12-30 06:28:03


I'm using MS Visual Studio 2005 to work on some legacy code that has
its origins back in 16-bit Windows, and relies on the /Zp2 switch to
align fields in structures in the same way as earlier versions.

One of the more recent modules uses boost::format, and this has
compiled correctly and been working with Boost 1.34.1. I'm trying to
bring the project up-to-date using 1.37, and I am getting
BOOST_STATIC_ASSERT reports when I include boost/format.hpp.

I don't have to *use* format in my code, just including
boost/format.hpp in a "Hello world" program is sufficient to trigger
the error when using /Zp2

Is this to be expected?

Is there a workaround?

I know we should really use explicit pack pragmas around the structures
that have to be packed in this particular way, but there are too many
of them -- and they're defined all over the code -- for this to be a
simple or safe process ... /Zp2 has always worked fine in the past.

Cheers,
 Daniel
 (Just a user -- not to be confused with the Boost contributor of the
same name)
 


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