
3 Feb
2010
3 Feb
'10
7:10 p.m.
On Tuesday 02 February 2010 21:29:40 Hicham Mouline wrote:
I can't find this left shift operator in Boost.PP. Do you mean << ? But then how do I evaluate it in the context of the preprocessor?
Unless I have misunderstood your question (very likely), isn't this what you need? #define POWER2(a) (1<<a) // Example usage in the context of the preprocessor #if POWER2(3) == 8 #error "Success, correct calculation" #else #error "Failure" #endif Regards, Ravi