МВ
Size: a a a
МВ
МВ
МВ
МВ
МВ
Base as_base = *cast(Base*)(&d);так все работает
МВ
МВ
Base as_base = d;//*cast(Base*)(&d);тоже сегфолт
as_base.test();
МВ
МВ
Any interface that derives from a C++ interface is also a C++ interface. A C++ interface differs from a D interface in that:
It cannot be the argument to destroy.
References cannot be upcast to the enclosing class object, nor can they be downcast to a derived interface.
The C++ calling convention is the default convention for its member functions, rather than the D calling convention.
The first member of the vtbl[] is not the pointer to the Interface, but the first virtual function pointer.
МВ
МВ
МВ
МВ