C++:
class IComponent
{
virtual Variant CallMethod(String method, Slice<const Variant> args) = 0;
};
class Component : public IComponent
{
Variant CallMethod(String method, Slice<const Variant> args) override final;
};
D:
extern(C++) interface IComponent
{
Variant CallMethod(String method, Slice!(const(Variant)) args);
}
extern (C++) class Component : IComponent
{
final override Variant CallMethod(String method, Slice!(const(Variant)) args);
}
I think override + final is messing up the C++ mangling.
C++: ?CallMethod@Component@ep@@UEAA?AUVariant@2@U?$BaseString@D@2@U?$Slice@$$CBUVariant@ep@@@2@@Z
D: ?CallMethod@Component@ep@@QEAA?AUVariant@2@U?$BaseString@D@2@U?$Slice@UVariant@ep@@@2@@Z
'U' is a 'Q', and C++ has a bonus '$$CB'
Comment #1 by turkeyman — 2016-01-26T04:13:47Z
MSVC 2015 - Win64
Comment #2 by bugzilla — 2016-01-26T06:07:49Z
I need a complete example, i.e. the example must be standalone. String, Variant and Slice are not defined.
Comment #3 by dfj1esp02 — 2016-01-26T10:31:16Z
Looks like 'U' is virtual, 'Q' is final, '$$CB' is const in Slice<const Variant>.
Comment #4 by turkeyman — 2016-01-28T02:22:56Z
(In reply to Walter Bright from comment #2)
> I need a complete example, i.e. the example must be standalone. String,
> Variant and Slice are not defined.
I define them as empty structs when testing.
extern(C++) struct Slice(T) {}
extern(C++) struct String {}
extern(C++) struct Variant {}
Comment #5 by iamthewilsonator — 2019-06-10T04:49:46Z