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

master
Marc Wäckerlin 13 years ago
parent 3b7cacef39
commit d33498dbb1
  1. 2
      configure.in
  2. 10
      doc/examples/smartpointer.cxx
  3. 5
      doc/makefile.am

@ -44,7 +44,7 @@ AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc.waeckerlin@tech.swiss
AC_CONFIG_FILES([makefile ${PACKAGENAME}.spec src/version.cxx
src/makefile test/makefile
doc/doxyfile doc/makefile
src/mrw/mrw.hxx
src/mrw/mrw.hxx doc/examples/makefile
src/${PACKAGENAME}.pc debian/changelog])
# copy M4 to shell

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

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

Loading…
Cancel
Save