Thanks for all this reference material. Another forum thread to link from the official documentation?
I think it would be convenient to define a new set of conditional directives that interpret their comparison values as numbers [...] What do you think? This could be ready for the next version; it is very easy to implement.
If it's easy and clean, then go on. Nobody's gonna complain
.
My personal opinion, though, is that it would be nice to have a C-like preprocessor. A quick look in the linux source code shows an #if directive that accepts arithmetic, relational, logical and bitwise operations (but you, as a C++ programmer, already know this
). I see that as a more programmer-friendly scheme than a whole family of directives, even if their names are logical and intuitive. Plus, it would allow scripts to work with all version-related symbols without a glitch, whereas the current scheme could give problems when, for example, __PI_BUILD__ goes from 999 to 1000. It could also be made to work with strings when, for example, all tokens involved were quoted.
Is there a compelling reason why you didn't implement a C-like #if from the beginning? For me, it would be the one, true way
.