src/core/ptr.cc
changeset 1007 3838d8b043c0
parent 732 df256f32b6ae
child 2229 31cb5ef6a020
child 2230 9f13ac3291e0
--- a/src/core/ptr.cc	Fri Jul 27 09:53:15 2007 +0200
+++ b/src/core/ptr.cc	Fri Jul 27 15:37:05 2007 +0200
@@ -28,9 +28,14 @@
 
 namespace ns3 {
 
+template <typename T>
+void Foo (void) {}
+
+
 class NoCount : public Object
 {
 public:
+  NoCount (void (*fn) (void));
   NoCount (Callback<void> cb);
   ~NoCount ();
   void Nothing (void) const;
@@ -292,12 +297,22 @@
     callback ();
   }
 
+
 #if 0
   // as expected, fails compilation.
   {
     Ptr<const Object> p = Create<NoCount> (cb);
     Callback<void> callback = MakeCallback (&NoCount::Nothing, p);
   }
+  // local types are not allowed as arguments to a template.
+  {
+    class B
+    {
+    public:
+      B () {}
+    };
+    Foo<B> ();
+  }
 #endif