I'm writing a class that I want to be able to accept several options with one parameter, similar to the way you can specify setiosflags( ios::fixed | ios::showpoint )

I tried to check the type of some of these ios flags, but they are enum's, which doesn't help me very much. I understand that for int's, the | operator effectively adds them ( 5 | 2 = 7, for example ), and that by using ints with values that are powers of 2, one can figure out which combination of objects was passed by looking at the sum. Is that usually how it's done (using int's)? If so, is there an easy way to break the sum down into the individual combinations? The only way I can think of immediately is to divide by the highest power of 2 that leaves a power of 2 as a remainder, but it seems like it could be easier...TIA for any help.