Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-03-19 20:59:53


"Giovanni Bajo" <giovannibajo_at_[hidden]> writes:

> 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.

That's exactly what it's supposed to do. What are you expecting?

The comment says:

// When used for workarounds on the latest known version of a
// compiler, the following convention should be observed:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
//
// The version number in this case corresponds to the last version in
// which the workaround was known to have been required. It only has
// value as a comment unless BOOST_DETECT_OUTDATED_WORKAROUNDS is
// defined, in which case a compiler warning or error will be issued
// when the compiler version exceeds the argument to BOOST_TESTED_AT

Maybe it should say "when used for workarounds that apply to the
latest known version and all earlier versions of a compiler, ..."

> 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).

There's nothing wrong with BOOST_TESTED_AT, AFAICT.

> - msvc_disambiguiter.hpp should use BOOST_WORKAROUND and it's needed only up
> to 1300.

That should be:

     BOOST_WORKAROUND(BOOST_MSVC, <= 1300)

then.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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