C++ / Wrong function signature generated for reference parameter

Robert M. Münch robert.muench at saphirion.com
Wed May 2 21:55:31 UTC 2018


I have the following C++ function signature:

	uint _begin(Image& image, const InitParams* initParams)
and the following D code:
  class InitParams {
  }
  class B2D {
    uint _begin(ref Image image, InitParams initParams);
  }
But this compiles to the following signature which is not found by the linker:
public: virtual unsigned int __cdecl b2d::Context2D::_begin(class 
b2d::Image * &,class b2d::InitParams *)
I don't understand why "ref Image" translates to "Image * &" and not 
"Image &". How can I get the C++ reference function signature written 
down in D?
-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



More information about the Digitalmars-d-learn mailing list