middle of porting; unstable, don't checkout, examples compile, crashes; refs #1

This commit is contained in:
Marc Wäckerlin
2011-12-11 12:23:55 +00:00
parent 3b7cacef39
commit d33498dbb1
3 changed files with 10 additions and 7 deletions

View File

@@ -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;

View File

@@ -5,7 +5,10 @@
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
ALL_SRC = ${top_srcdir}/src/*.[ch]xx
SUBDIRS = examples
ALL_SRC = $(shell find ${top_srcdir}/doc/examples ${top_srcdir}/src \
-name '*.[ch]xx')
# ${top_srcdir}/src/*.doc
DIRS = html