|
Boost : |
Subject: Re: [boost] [preprocessor] ifdef equivalent inside a macro, is it possible?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-08-10 10:26:49
On 10/08/2011 15:15, damien benoist wrote:
> Hi all,
> Would there be a way to do some "ifdef" inside a macro?
> Could be in the form of a macro taking 3 args,
> - 1st being the macro to test the existance of,
> - 2nd being the value to expand in case 1st arg is a defined macro
> - 3rd being the value to expand in case 1st arg is not a defined macro
Not really.
You can test whether a macro expands to 0 or 1 though.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk