4 Feb
2010
4 Feb
'10
8:57 p.m.
On Thursday 04 February 2010 10:49:25 Hicham Mouline wrote:
// Must expand to "int foo8;", but it does not. int BOOST_PP_CAT(foo, POWER2(3));
Exactly. Ravi, the macro expansion does not evaluate the << operator, that is done at compile-time.
I see now. Roman's proposed solution is the right one. If you look at any of the headers inside boost/preprocessor/arithmetic/, your solution (for the usual operators) and Roman's solution (for inc and dec) are really the only ones that are used. Regards, Ravi