Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkmm-root/base/ChangeLog,v
retrieving revision 1.437
diff -u -3 -r1.437 ChangeLog
--- ChangeLog	8 Aug 2002 19:59:14 -0000	1.437
+++ ChangeLog	9 Aug 2002 18:39:59 -0000
@@ -1,3 +1,12 @@
+2002-09-08  Martin Schulze  <MHL.Schulze@t-online.de>
+
+	* configure.in,scripts/cxx.m4,gtk/gtkmmconfig.h.in: Add configure
+	time check as proposed by Joe Yandle with some modifications. It
+	checks whether the compiler allows member functions to refer to
+	specializations of member function templates.
+	* gtk/src/treeview.hg: Use configure time check from above for
+	conditional compilation of the critical code.
+
 2002-08-08  Murray Cumming  <murrayc@usa.net>
 
 	* Removed examples/combo and examples/menu. They are replaced by
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gtkmm-root/base/configure.in,v
retrieving revision 1.101
diff -u -3 -r1.101 configure.in
--- configure.in	8 Aug 2002 19:59:15 -0000	1.101
+++ configure.in	9 Aug 2002 18:40:01 -0000
@@ -170,6 +170,7 @@
 GTKMM_CXX_HAS_STD_ITERATOR_TRAITS()
 GTKMM_CXX_HAS_SUN_REVERSE_ITERATOR()
 GTKMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS()
+GTKMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES()
 
 # Create a list of input directories for Doxygen.
 GTKMM_DOXYGEN_INPUT_SUBDIRS([glib pango atk gdk gtk])
Index: gtk/gtkmmconfig.h.in
===================================================================
RCS file: /cvs/gnome/gtkmm-root/base/gtk/gtkmmconfig.h.in,v
retrieving revision 1.6
diff -u -3 -r1.6 gtkmmconfig.h.in
--- gtk/gtkmmconfig.h.in	20 Jun 2002 22:02:58 -0000	1.6
+++ gtk/gtkmmconfig.h.in	9 Aug 2002 18:41:21 -0000
@@ -36,6 +36,7 @@
 #undef GTKMM_CXX_HAVE_NAMESPACES
 //#undef GTKMM_CXX_GAUB
 //#undef GTKMM_CXX_AMBIGUOUS_TEMPLATES
+#undef GTKMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES
 #endif
 
 #ifdef GTKMM_MSC
Index: gtk/src/treeview.hg
===================================================================
RCS file: /cvs/gnome/gtkmm-root/gtk-src/treeview.hg,v
retrieving revision 1.50
diff -u -3 -r1.50 treeview.hg
--- gtk/src/treeview.hg	7 Aug 2002 21:02:41 -0000	1.50
+++ gtk/src/treeview.hg	9 Aug 2002 18:42:17 -0000
@@ -327,6 +327,7 @@
   }
 }
 
+#ifdef GTKMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES
 //int specialization:
 template<> inline
 void TreeView::_connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer,  const TreeModelColumn<int>& model_column)
@@ -343,7 +344,7 @@
   }
 }
 
-//int specialization:
+//unsigned int specialization:
 template<> inline
 void TreeView::_connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer,  const TreeModelColumn<unsigned int>& model_column)
 {
@@ -390,6 +391,7 @@
       SigC::bind( SigC::slot(*this, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<unsigned long>), model_column.index()) );
   }
 }
+#endif //GTKMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES
 
 //This is used on string model columns:
 template <class ColumnType> inline
Index: scripts/cxx.m4
===================================================================
RCS file: /cvs/gnome/gtkmm-root/base/scripts/cxx.m4,v
retrieving revision 1.1
diff -u -3 -r1.1 cxx.m4
--- scripts/cxx.m4	29 Apr 2001 07:51:41 -0000	1.1
+++ scripts/cxx.m4	9 Aug 2002 18:42:22 -0000
@@ -88,3 +88,53 @@
 ])
 
 
+dnl
+dnl GTKMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES(ACTION_FOUND,ACTION_NOT_FOUND)
+dnl
+dnl Test whether the compiler allows member functions to refer to spezialized member function templates.
+dnl Some compilers have problems with this. gcc 2.95.3 aborts with an internal compiler error.
+dnl
+AC_DEFUN([GTKMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[
+AC_MSG_CHECKING([if C++ compiler allows member functions to refer to member templates])
+AC_TRY_COMPILE(
+[
+  struct foo {
+    template <class C> inline
+    void doit();
+    void thebug();
+  };
+
+  template <class C> inline
+  void foo::doit() {
+  }
+
+  struct bar {
+    void neiterabug();
+  };
+],[
+  void notabug() {
+    void (foo::*func)();
+    func = &foo::doit<int>;
+  }
+
+  void bar::neitherabug() {
+    void (foo::*func)();
+    func = &foo::doit<int>;
+  }
+
+  void foo::thebug() {
+    void (foo::*func)();
+    func = &foo::doit<int>; //Compiler bugs usually show here.
+  }
+],[
+  gtkmm_cxx_member_functions_member_templates=yes
+  AC_DEFINE([GTKMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[1],[does the C++ compiler allow member functions to refer to member templates])
+  AC_MSG_RESULT([$gtkmm_cxx_member_functions_member_templates])
+],[
+  gtkmm_cxx_member_functions_member_templates=no
+  AC_DEFINE([GTKMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[0])
+  AC_MSG_RESULT([$gtkmm_cxx_member_functions_member_templates])
+])
+])
+
+
