Boost logo

Boost Users :

Subject: Re: [Boost-users] PP: 2 to the power x macro
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-02-04 10:49:25


>From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Roman Perepelitsa
>Sent: 04 February 2010 9:27
>To: boost-users_at_[hidden]
>Subject: Re: [Boost-users] PP: 2 to the power x macro

>How about this?

>// Must expand to "int foo8;", but it does not.
>int BOOST_PP_CAT(foo, POWER2(3));

>Roman Perepelitsa.

Exactly.
Ravi, the macro expansion does not evaluate the << operator, that is done at
compile-time.

So Roman, what do you think of my POWER2 implementation?

It is very slow (to preprocess) in an actual example I have.
Can anyone see a faster implementation?

Regards,


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net