Hello,

I am working on a C++ to D converter.
The project is opensource, on github : https://github.com/lhamot/CPP2D


Clang is used to parse the C++ code and get the abstract syntax tree. Then I can visit the AST to print it to D language.
Some tricks are used to convert the simplest macros to mixin.

Some C++ features which are not straightforward to convert are already handled, like (A not exhaustive list):
    class
        constructor/destructor
        virtual
        abstract
        override
        initialization list
        call base constructor
    Operator overloading
        member
        free
            left or right
    Template
        function
        function specialization
        class
        class/struct specialization
        class/struct partial specialization
    arrays
        static
        dynamic

Some examples here : https://github.com/lhamot/CPP2D/wiki/Conversion-samples

If somebody is interested to use this software, or to participate, do not hesitate to contact me.

Regards

Reply via email to