middle of porting; unstable, don't checkout, examples compile, crashes; refs #1
This commit is contained in:
@@ -10,14 +10,14 @@ class B: virtual public A {
|
||||
};
|
||||
|
||||
int main(int, char**) {
|
||||
utl::SmartPointer<int> i1 = new int;
|
||||
mrw::SmartPointer<int> i1 = new int;
|
||||
*i1 = 13;
|
||||
utl::SmartPointer<int> i2 = i1;
|
||||
utl::SmartPointer<int> i3;
|
||||
mrw::SmartPointer<int> i2 = i1;
|
||||
mrw::SmartPointer<int> i3;
|
||||
if (!i3) i3 = i2;
|
||||
*i2 = 666; // *i1 is now 666 too
|
||||
utl::SmartPointer<A> b1 = new B;
|
||||
utl::SmartPointer<B> b2 = b1; // b1 and b2 point to the same instance
|
||||
mrw::SmartPointer<A> b1 = new B;
|
||||
mrw::SmartPointer<B> b2 = b1; // b1 and b2 point to the same instance
|
||||
b1->a = 0; // b1->b does not compile
|
||||
b2->a = 1;
|
||||
b2->b = 2;
|
||||
|
Reference in New Issue
Block a user