Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-05 19:13:23


----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>

> > Well, it does rule out some use-cases, and it is not ideal to have such
limitations, but it should
> > still be useful for testing whether an object-like macro, such as an
include guard, or a config
> > macro, has been defined. I think that there are many uses for the
> > macro.
>
> How can you use a macro which only tells you if a function-like macro
> is defined to tell you if an object-like macro is defined?

No, it only tells you if an object-like macro is defined or not. If a
function-like macro is passed into the "function," it will more than likely
result in an attempted call of the macro with insufficient arguments--which
is illegal. I.e. this would be fine:

#define MY_CONFIG_MACRO

IS_EMPTY( MY_CONFIG_MACRO ) // 1

...while this is not a valid input:

#define MY_CONFIG_MACRO(a, b)

IS_EMPTY( MY_CONFIG_MACRO ) // error insufficient arguments

Paul Mensonides


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