digitalmars.D - Mangling C++ Functions?
- John (16/16) Dec 01 Does anyone have any solutions around the problem of linking to
Does anyone have any solutions around the problem of linking to C++ functions from D that use types that D can't represent? Such as "float* const"? I don't want to just stick the symbol name in a pramga(mangle, "...") as that won't be portable. Possibly implementing mangling for extern(C++) for core.mangleFunc but somehow allow for the pointers to be modified. I'm not sure what a good interface for that would look like. As you can have a bunch of pointers to pointers "float****" with each indirection being able to be const or not independent of each other. The most common use case would propbably be either one or two indirections, I am thinking of when a function has the following definition: "void func(float param)" "void func(float* param)" Which results in the definition for the parameter being "float* const" or "float** const".