I am trying to use a third-party SDK in C ++ code. Although the SDKs and headers are technically compatible with C ++, it's really just a piece of nasty C.
In particular, the main header files contain many hundreds of #defines, of which they are worse.
#define C 0 //Celsius #define F 1 //Fahrenheit #define R 2 // Rankine #define K 3 // Kelvin
Now you can imagine what good error messages I get when I try to use boost libraries that have these kinds of things:
template< typename F > struct template_arity;
A few tactical #undefs can fix the situation, but it still looks like a tick bomb. I could alternatively rewrite large parts of the third-party header, or just try and isolate the sections that I really need.
Is there a better solution to this problem?
Roddy source share