Can you make an incrementing compiler constant?
- by Keith Nicholas
While sounding nonsensical.....
I want a Contant where every time you use it it will increment by 1
int x;
int y;
x = INCREMENTING_CONSTNAT;
y = INCREMENTING_CONSTNAT;
where x == 1; and y == 2
Note I don't want y = INCREMENTING_CONSTNAT+1 type solutions.
Basically I want to use it as a compile time unique ID ( generally it wouldn't be used in code like the example but inside another macro)