[Issue 1688] New: "extern (C++) interface" and vtbl

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 23 08:56:06 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1688

           Summary: "extern (C++) interface" and vtbl
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: niqbmozgvx at mailinator.com


cpp_interface.html:
> a D interface with the attribute of extern (C++) will have a virtual function
> pointer table (vtbl[]) that exactly matches C++'s [...] in C++ the first
> entry points to the first virtual function.

extern (C++) interface A { void foo(); void bar(); }
A a = ...;

So calling a.foo() should call vtbl[0], instead D calls vtbl[1] as if it where
a normal D interface.


-- 



More information about the Digitalmars-d-bugs mailing list