Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2005-02-12 17:29:57


On Sat, Feb 12, 2005 at 01:29:55PM -0700, Jonathan Turkanis wrote:

> Hi,
>
> I have a workaround which I want to apply to all known versions of GCC but not
> to future versions unless I later determine that it is necessary. Currently I
> have something like this:
>
> #if !defined(BOOST_INTEL) && ( BOOST_WORKAROUND(__GNUC__, <= 3) || \
> BOOST_WORKAROUND(__GNUC__, == 4) && \
> BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) ) \
> /**/
> ...
> #endif
>
> but I can see from the regression reports that GCC 4.0 is not picking up the
> workaround code.
>
> What am I doing wrong?

I've wondered about BOOST_TESTED_AT before - I don't think it does
the right thing unless BOOST_DETECT_OUTDATED_WORKAROUNDS is defined:

# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
# define BOOST_OPEN_PAREN (
# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
# else
# define BOOST_TESTED_AT(value) != ((value)-(value))
# endif

Now forgive me if I'm being stupid, but unless you're compiling with
BOOST_DETECT_OUTDATED_WORKAROUNDS, then
BOOST_WORKAROUND( __GNUC_MINOR__, BOOST_TESTED_AT(0) )
tests __GNUC_MINOR__ != 0, which is exactly the opposite of what you are
trying to test.

Should BOOST_TESTED_AT be defined like this?

# define BOOST_TESTED_AT(value) <= (value)

Am I being stupid?

jon

-- 
"There are basically two types of people. People who accomplish things,
 and people who claim to have accomplished things.
 The first group is less crowded."
	- Mark Twain

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