Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2003-03-19 20:37:45


Hello,

I had a problem compiling boost::format with MSVC 7.1 (final beta). It
appears that BOOST_TESTED_AT is confusing MSVC preprocessor, in fact the
following code

#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1300))
#error blah
#endif

always aborts compilation. I had to remove the BOOST_TESTED_AT() macro from
feed_args.hpp:73 to make the library compile (it was failing because
msvc_disambiguiter.hpp does not use BOOST_WORKAROUND, so it was completely
skipped, and some symbols were missing).

So:

- BOOST_TESTED_AT should be fixed for MSVC 7.1 (unless the bug in the
preprocessor has been already fixed in a release candidate version, I don't
have access to them).
- msvc_disambiguiter.hpp should use BOOST_WORKAROUND and it's needed only up
to 1300.
- The workaround at feed_args.hpp:73 is no longer needed for 7.1, so the
macro BOOST_TESTED_AT() can be removed from that line.
- I volunteer to test the other workarounds (through regression testing) on
7.1 and help fixing other issues (there are several warnings). I will post
my results on the list in the next days.

Also a little question: what's the rationale of putting the freestand str()
function (used to convert a boost::format into std::string) into the
boost::io namespace? Was it in namespace boost, it could be called
unqualified thanks to koenig lookup. Actually I'm doing:

namespace Boost { using io::str; }

in my code and it works flawlessly for me.

Thanks
Giovanni Bajo


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