When is doing conditional compilation a good idea and when is it a horribly bad idea?
By conditional compile I mean using #ifdef
s to only compile certain bits of code in certain conditions. The #defined
s themselves may be in either a common header file or introduced via the -D
compiler directive.
The good ideas:
extern "C" {
and }
so that the same headers may be used by the C++ implementation and by the C clients of the APIThe bad idea:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With