Quoting Ed Keith
--- Peter Bartlett
wrote: Quoting Ed Keith
: [...]
BOOST_PP_IF(abc == abc, foo, bar)
I get an error.
Is it possible to do something like this? If so, what am I doing wrong?
I think you have to use BOOST_PP_IF( BOOST_PP_EQUAL(abc,abc) , foo, bar ) here.
I tried that, but apparently BOOST_PP_EQUAL only takes int values.
Thank for the suggestion though,
-EdK
Ok. BOOST_PP_IF has a similar restriction, so you probably can't do what you want with it. Be sure though that even the '#if' version is doing what you want - for example the following program prints 1 on my compiler (VC9): #if foo == bar int baz() { return 1; } #else int baz() { return 0; } #endif #include <iostream> int main() { std::cout << "\n" << baz() << "\n"; }