... it's the context in which you use it. And depending on how you use this C constant that Henrik A stumbled across, it can get pretty interesting ...

#define MAX_PID  2^sizeof(SpaceId)-1 //SpaceId is typedef int, sizeof(int) is 4

At first, I didn't get it either. But, when you consider that the ^ operator is the very-low-priority bitwise-xor operator, you have quite a lot of uses for it:

(MAX_PID)     =>   1
MAX_PID == 1  =>   2
1 == MAX_PID  =>   3
1+MAX_PID     =>   0
MAX_PID+1     =>   6
MAX_PID*5     =>  -3

I was going to post this earlier, but wanted to clarify what the ^ operator was all about. So, it's a real two-for-one day today.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!