On 16/02/2016 12:04 PM, Walter Bright wrote:
It's currently difficult to interface with C++, and always will be, but
smoothing out what we can can be a big opportunity for D.
I'm starting to think we should give up on implementing C++ support in
the language and move it to the library.
eg
mixin(cppFunctionBinding("unsigned long long NameSpace::myFunc(char *
const && x, long double y)");
expands to some combination of pragma(mangle) and extern(C++)
With the limitation that only declarations can be parsed, it's not that
bad to implement a ctfe C++ parser, and we can stop the creep of C++
features and hack into D.
As a bonus, it could generate wrappers when we really can't match the
semantics well enough.