C++ -> D converter mentioned in AMA

Jacob Carlborg doob at me.com
Fri Oct 4 05:09:28 PDT 2013


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


More information about the Digitalmars-d mailing list