Packets: Fix VariantParser invalid parser access bug
[senf.git] / Utils / intrusive_refcount.hh
index ca2ccb6..d3b980f 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+//     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@
 /** \file
     \brief intrusive_refcount public header */
 
-#ifndef HH_intrusive_refcount_
-#define HH_intrusive_refcount_ 1
+#ifndef HH_SENF_Utils_intrusive_refcount_
+#define HH_SENF_Utils_intrusive_refcount_ 1
 
 // Custom includes
 #include <boost/utility.hpp>
@@ -61,6 +61,13 @@ namespace senf {
     private:
         refcount_t refcount_;
         
+        template <class S> void intrusive_ptr_add_ref();
+        template <class S> void intrusive_ptr_release();
+        
+        template <class S>
+        friend void senf::intrusive_ptr_add_ref(intrusive_refcount_t<S> const * p);
+        template <class S>
+        friend void senf::intrusive_ptr_release(intrusive_refcount_t<S> const * p);
     };
 
     /** \brief Customizable reference count mixin for intrusive_ptr
@@ -115,15 +122,6 @@ namespace senf {
     {
     protected:
         intrusive_refcount_t();
-
-    private:
-        void intrusive_ptr_add_ref();
-        void intrusive_ptr_release();
-
-        template <class S>
-        friend void senf::intrusive_ptr_add_ref(intrusive_refcount_t<S> * p);
-        template <class S>
-        friend void senf::intrusive_ptr_release(intrusive_refcount_t<S> * p);
     };
 
     /** \brief Reference count mixin for intrusive_ptr
@@ -160,9 +158,9 @@ namespace senf {
     };
 
     template <class Self>
-    void intrusive_ptr_add_ref(intrusive_refcount_t<Self> * p);
+    void intrusive_ptr_add_ref(intrusive_refcount_t<Self> const * p);
     template <class Self>
-    void intrusive_ptr_release(intrusive_refcount_t<Self> * p);
+    void intrusive_ptr_release(intrusive_refcount_t<Self> const * p);
 
 }