C++ / Wrong function signature generated for reference parameter

Robert M. Münch robert.muench at saphirion.com
Thu May 3 07:00:03 UTC 2018


On 2018-05-03 02:23:27 +0000, Rubn said:

> You want to use a struct which isn't passed by pointer, but by value. 
> Which will then give you the signature you want.

In addition to my other post, using struct won't give the correct 
signature. That's the signature I need:

public: unsigned int __cdecl b2d::Context2D::_begin(class b2d::Image & 
__ptr64,class b2d::Context2D::InitParams const * __ptr64) __ptr64

And this is what D does when using a struct:

public: unsigned int __cdecl b2d::Context2D::_begin(struct b2d::Image 
&,class b2d::InitParams const * const)

Of course the linker can't resolve this. Not sure about the const part 
too, if this is correct on the D side...

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



More information about the Digitalmars-d-learn mailing list