$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [preprocessor] different macro expansion depending on whether its argument is defined or not?
From: Ingolf Steinbach (ingolf.steinbach_at_[hidden])
Date: 2009-10-16 06:36:17
Hi,
is it possible to write a preprocessor macro which takes one argument
and which expands differently depending on whether the argument is
defined or not? Boost solution preferred.
Example:
#define FOO
#undef BAR
MY_MACRO(FOO) expands to 1
MY_MACRO(BAR) expands to 0
Kind regards
Ingolf