"puzzlecracker" <ir*********@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
#define BLACKBOX(x) ((x)&((x)-1))
It defines a macro called BLACKBOX with a parameter x, which expands as a
bitwise AND of x with x-1.
What do I win? :-)
Actually, the above is only strictly true for the built-in numeric types.
For a user-defined class, I believe it expands as
x.operator&(x.operator-(1))
(I'm terrible at this crap. But I'm correct, right?)
So what it "does" depends largely upon what the type of x is, and how the
operators & and - for that type are defined.
-Howard