On 2013-10-04 12:21, Daniel Murphy wrote:

I deal with this by not running a preprocessor.  The #if directives are
parsed as if they're real C++ constructs, and this means everything inside
(and around) them must be valid C++ code.

With this constraint, translating them to static if/version and doing all
versions simultaneously becomes possible.

Then you need to A) build your own preprocessor or B) limiting yourself to non-generic code, as you have done in this case. This was my original point, having it work on generic code.

--
/Jacob Carlborg

Reply via email to