CXX = /home/wolf/bin/gcc/bin/c++
endif
+
+test: run-reference run-logtest run-tensor
+
+
reference: reference.go
- $(CXX) -o $@ $^
\ No newline at end of file
+ $(CXX) -o $@ $^
+
+run-reference: reference
+ ./reference
+
+logtest: logtest.go
+ $(CXX) -o $@ $^ $D/base/lib/libbase.g.a
+
+run-logtest: logtest
+ ./logtest
+
+tensor: tensor.go
+ $(CXX) -o $@ $^
+
+run-tensor: tensor
+ ./tensor
+
+
+clean:
+ -rm *.o *.go reference logtest tensor
+
+
+
+.PHONY: test run-reference run-logtest run-tensor clean
-#include "../newdeal/base/include/base/logstream.h"
+#include <base/logstream.h>
-LogStream deallog;
main()
{
#include <iostream>
#include <base/subscriptor.h>
-
+#include <base/smartpointer.h>
class Test : public Subscriptor
const Test b;
SmartPointer<Test> r=&a;
SmartPointer<const Test> s=&a;
- SmartPointer<Test> t=&b; // this one should give a warning
+// SmartPointer<Test> t=&b; // this one should not work
+ SmartPointer<Test> t=const_cast<Test*>(&b);
SmartPointer<const Test> u=&b;
a.f(); // should print "mutable", since #a# is not const
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams