I wan to define enum with non constant step. I want that the step between 2 enum variables looks like that:
enum test {
a1 = 1,
a2 = 1<<2,
a3 = 1<<3,
a4, // a4 deduced automatically as 1<<4
a5 // a5 deduced automatically as 1<<5
}
Are there a way to define it as indicated in the above example?
You must do this manually, or possibly with macro chicanery.