C++ / Wrong function signature generated for reference parameter
kinke
kinke at libero.it
Thu May 3 09:34:56 UTC 2018
On Thursday, 3 May 2018 at 07:00:03 UTC, Robert M. Münch wrote:
> using struct won't give the correct signature
That's why there's `extern(C++, class) struct Image`, see
https://dlang.org/spec/cpp_interface.html#classes.
> Not sure about the const part too, if this is correct on the D
> side...
As const is transitive in D, mangling a const object reference as
C++ `const T *const` is consistent, but also means that a `const
T *` cannot be mapped directly to D via a class (but as
`const(T)*` if T is a D struct).
More information about the Digitalmars-d-learn
mailing list