The code below shows that the this pointer gets corrupted when this code compiles and runs. Sample output: Bar = 0x81c33a8 This = 0xbf8dce20 cpp file: #include <iostream> struct foo{ int i; int j; }; class bar{ public: virtual foo getFoo(){ std::cout << "This = " << this << std::endl; foo f; return f; } }; bar* newBar(){ bar* b = new bar(); std::cout << "Bar = " << b << std::endl; return b; } d file: extern(C++){ struct foo{ int i; int j; } interface bar{ foo getFoo(); } bar newBar(); } void main(){ bar b = newBar(); foo f = b.getFoo(); }
Fixed dmd 1.038 amd 2.022
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル