On Sun, 08 Dec 2002 12:34:48 -0500, David Abrahams <[EMAIL PROTECTED]> wrote:
[snip] >> // untested >> #define BOOST_PSEUDO_IS_DEFINED(symbol) BOOST_JOIN(symbol, 1) >> #define BOOST_WORKAROUND(symbol, test) \ >> (BOOST_PSEUDO_IS_DEFINED(symbol) && symbol test) > >This will fail if "symbol1" is defined, won't it? Oops, due to the font used when reading mails from Yahoo, I thought this was a typo for "symbol" :-s Yes, you are right. It wasn't intended as a solution to >> b) "hides" possible problems in the (unlikely, granted) case that >> X is undefined but X1 is and you write: >> >> BOOST_WORKAROUND(X, test) >> >> (the result "unexpectedly" depends on the expansion of X1). just as an (untested) way to avoid the dependency on the preprocessor library. It is exactly the same of the current implementation, except that uses BOOST_JOIN instead of BOOST_PP_CAT. Genny. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost