3 ms·
Has there been any notable success story with extern(c++)? I know some folks use it to interop with their own C++ code, but I haven't seen any new bindings to a
by skocznymroczny 5y ago
Has there been any notable success story with extern(c++)? I know some folks use it to interop with their own C++ code, but I haven't seen any new bindings to any popular C++ libraries.
- mhh__ 5y agoextern(C++) is what allows the LLVM D compiler to work for example. Binding C++ libraries is quite risky in the sense that the libraries usually aren't meant to be consumed via that API. For that reason it's mainly used (publicly at least, there are things I know that I cannot say) for exposing D to C++ in a sane way (Mangling, vtables, templates, all work, exceptions even!).