[Issue 14193] Provide a way to mangle a D struct as a C++ class.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Feb 17 07:36:38 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14193

Benjamin Thaut <code at benjamin-thaut.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code at benjamin-thaut.de

--- Comment #2 from Benjamin Thaut <code at benjamin-thaut.de> ---
The core issue is that sometimes C++ libraries will use "class" for value
types. On Windows (at least MSVC) struct and class types are mangled
differently. So it is not possible to declare std::string as a struct on the D
side (which would be possible on gcc / clang because they don't mangle structs
and classes differently). This has nothing to do with a "painless C++
integration". It would just help integrating C++ when you don't have control
over the C++ source.

--


More information about the Digitalmars-d-bugs mailing list