struct Foo : Pte<Foo> {String text;}; CONSOLE_APP_MAIN { Ptr<Foo> ptr; { Foo foo; foo.text = "Text"; ptr = &foo; Cout() << (void*)~ptr << " -> " << ptr->text << "\n"; } Cout() << (void*)~ptr << "\n"; // foo was destroyed but this is totally valid, as ptr == 0 }
Report message to a moderator