Created
May 21, 2010 01:05
-
-
Save djg/408347 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Flags | |
{ | |
Flag1 = 0x1, | |
Flag2 = 0x2, | |
Flag3 = 0x4, | |
Flag4 = 0x8 | |
}; | |
Flags operator|(Flags a, Flags b) | |
{ | |
return Flags((int)a | (int)b); | |
} | |
int main() | |
{ | |
Flags f = Flag1 | Flag2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment