Using C++ with D / returning a templated type from C++

Robert M. Münch robert.muench at saphirion.com
Thu Jul 5 10:36:12 UTC 2018


On 2018-07-05 08:14:18 +0000, Seb said:

> On Thursday, 5 July 2018 at 06:35:01 UTC, Robert M. Münch wrote:
>> So, the only difference left is the C++ static and the additional 
>> __ptr64 (whatever this is) on the D side. Any further ideas?
> 
> Could you post your current C++ and D files?

It's a big code base... that's a bit the problem why I try to strip 
things down. Maybe this is better: https://pastebin.com/dpQdAPye

This is the demangled form from the C++ link library:
public: static class b2d::Array<class b2d::ImageCodec> __cdecl 
b2d::ImageCodec::builtinCodecs(void)


With the D compiler I was able to generates these manglings:

public: class b2d::Array<class b2d::ImageCodec> * __ptr64 __cdecl 
b2d::ImageCodec::builtinCodecs(void) __ptr64
public: class b2d::Array<class b2d::ImageCodec> __cdecl 
b2d::ImageCodec::builtinCodecs(void) __ptr64


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



More information about the Digitalmars-d-learn mailing list