? glibmm.kdevprj
? glibmm.kdevses
? glibmm_gcc34.patch
? glibmm_gcc34_2.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/glibmm/ChangeLog,v
retrieving revision 1.67
diff -u -p -r1.67 ChangeLog
--- ChangeLog	13 Mar 2004 15:20:12 -0000	1.67
+++ ChangeLog	13 Mar 2004 22:11:22 -0000
@@ -1,5 +1,12 @@
 2004-03-13  Murray Cumming  <murrayc@murrayc.com>
 
+	* glib/glibmm/containerhandle_shared.h: TypeTraits to_cpp_type() 
+	specializations: Use wrap_auto() directly instead of a specific
+	wrap() overload that would be dependent. Needed for g++ 3.4.
+	* glib/glibmm/containers.h: Same again.
+
+2004-03-13  Murray Cumming  <murrayc@murrayc.com>
+
 	* tools/m4/class_shared.m4: Remove the parent get_type() call from
 	the Class::init() function, because it is optimised away, and g++ 3.4
 	actually complains that it does nothing.
Index: glib/glibmm/containerhandle_shared.h
===================================================================
RCS file: /cvs/gnome/glibmm/glib/glibmm/containerhandle_shared.h,v
retrieving revision 1.3
diff -u -p -r1.3 containerhandle_shared.h
--- glib/glibmm/containerhandle_shared.h	3 Feb 2004 11:08:05 -0000	1.3
+++ glib/glibmm/containerhandle_shared.h	13 Mar 2004 22:11:23 -0000
@@ -139,7 +139,16 @@ struct TypeTraits<T*>
 
   static CType   to_c_type      (CppType ptr) { return Glib::unwrap(ptr);      }
   static CType   to_c_type      (CType   ptr) { return ptr;                    }
-  static CppType to_cpp_type    (CType   ptr) { return Glib::wrap(ptr, false); }
+  static CppType to_cpp_type    (CType   ptr)
+  {
+    //We copy/paste the widget wrap() implementation here,
+    //because we can not use a specific Glib::wrap(T_Impl) overload here,
+    //because that would be "dependent", and g++ 3.4 does not allow that.
+    //The specific Glib::wrap() overloads don't do anything special anyway.
+    GObject* cobj = (GObject*)ptr;
+    return dynamic_cast<CppType>(Glib::wrap_auto(cobj, false /* take_copy */));
+  }
+  
   static void    release_c_type (CType   ptr)
   {
     GLIBMM_DEBUG_UNREFERENCE(0, ptr);
@@ -159,7 +168,16 @@ struct TypeTraits<const T*>
 
   static CType   to_c_type      (CppType ptr) { return Glib::unwrap(ptr);      }
   static CType   to_c_type      (CType   ptr) { return ptr;                    }
-  static CppType to_cpp_type    (CType   ptr) { return Glib::wrap(const_cast<CTypeNonConst>(ptr), false); /* TODO: Allow wrap() to take a const. */}
+  static CppType to_cpp_type    (CType   ptr)
+  {
+     //We copy/paste the widget wrap() implementation here,
+     //because we can not use a specific Glib::wrap(T_Impl) overload here,
+     //because that would be "dependent", and g++ 3.4 does not allow that.
+     //The specific Glib::wrap() overloads don't do anything special anyway.
+     GObject* cobj = (GObject*)const_cast<CTypeNonConst>(ptr);
+     return dynamic_cast<CppType>(Glib::wrap_auto(cobj, false /* take_copy */));
+  }
+  
   static void    release_c_type (CType   ptr)
   {
     GLIBMM_DEBUG_UNREFERENCE(0, ptr);
Index: glib/glibmm/containers.h
===================================================================
RCS file: /cvs/gnome/glibmm/glib/glibmm/containers.h,v
retrieving revision 1.2
diff -u -p -r1.2 containers.h
--- glib/glibmm/containers.h	22 Jan 2003 12:08:52 -0000	1.2
+++ glib/glibmm/containers.h	13 Mar 2004 22:11:23 -0000
@@ -222,8 +222,15 @@ public:
   reference operator*() const
   {
     if (node_ && node_->data)
-      return *Glib::wrap(static_cast<T_Impl*>((*node_).data));
-
+    {
+      //We copy/paste the widget wrap() implementation here,
+      //because we can not use a specific Glib::wrap(T_Impl) overload here,
+      //because that would be "dependent", and g++ 3.4 does not allow that.
+      //The specific Glib::wrap() overloads don't do anything special anyway.
+      GObject* cobj = static_cast<GObject*>( (*node_).data );
+      return *(dynamic_cast<pointer>(Glib::wrap_auto(cobj, false /* take_copy */)));
+    }
+    
     return *(pointer)glibmm_null_pointer;
   }
 
