I'm trying to write the equivalent of an enum in C++ going in steps of eight instead of one, like
enum
{
foo,
bar = 8,
baz = 16,
};
There will be a lot of entries, new ones will be added at intervals, and for clarity they really want to be written in an order other than order of entry, so it would be nice not to have to keep updating all the numbers by hand. I've tried mucking around with macro preprocessor tricks, but no dice so far. Is there a way to do this that I'm overlooking?