On Tue, 17 Dec 2002 11:44:12 -0000, "John Maddock"
<[EMAIL PROTECTED]> wrote:

>Personally I would rather that you stuck to the simplest possible
>implementation, and for me that outweighs the advantages that using the pp
>lib might bring.  The recent discussion is all very clever, but I'm not
>convinced that it really adds anything.

As to possible alternatives, my idea is to use two different macros:
the BOOST_WORKAROUND version, which Dave has already implemented, and
another one that doesn't let you specify a test, just the version. The
point is: what test could the user specify that can be negated without
giving unwanted errors when detection of outdated workarounds is
enabled? Basically, only <= (For instance: if you specify == 0x600,
you just risk to get an error when testing with version 0x500). That
considered, I would say: let him just specify the version with
something like

 #define ERROR(cond) (1 / (cond? 0 : 1))
 #define WORKAROUND_WITH_CHECK(symbol, version) (           \
        ((symbol) != 0)                                     \
        && ERROR(DETECT_OUTDATED && (symbol > version) )    \
                  )

Of course, since the purpose was just to illustrate the idea the
(unprefixed) macro names here are almost chosen at random ;-) Better
ones are welcome.


Genny.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to