[sigc] libigc++-1.9.8 compile error - patch attached.



Hi,

The libsigc++-1.9.8 test-signal.cc test file doesn't compile because sigc::internal::signal_emit1<> can't be instantiated. It seems that the 'call_type' function pointer in each slot class got moved from the slot's public interface to the private interface. I've attached a patch that fixes this - if that's any help.

Regards,

Jeff Franks.
diff -ru libsigc++-1.9.8/sigc++/functors/slot.h libsigc++-1.9.8-new/sigc++/functors/slot.h
--- libsigc++-1.9.8/sigc++/functors/slot.h	2003-10-20 01:50:19.000000000 +1000
+++ libsigc++-1.9.8-new/sigc++/functors/slot.h	2003-10-20 20:34:31.000000000 +1000
@@ -763,17 +763,14 @@
 class slot <T_return>
   : public slot_base
 {
-public:
-  typedef T_return result_type;
-
-
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
   typedef internal::slot_rep rep_type;
-  typedef T_return (*call_type)(rep_type*);
 #endif
 
 public:
+  typedef T_return (*call_type)(rep_type*);
+  typedef T_return result_type;
+
   /** Invoke the contained functor unless slot is in blocking state.
    * @return The return value of the functor invocation.
    */
@@ -807,18 +804,15 @@
 class slot <T_return, T_arg1>
   : public slot_base
 {
-public:
-  typedef T_return result_type;
-  typedef typename type_trait<T_arg1>::take arg1_type_;
-
-
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
   typedef internal::slot_rep rep_type;
-  typedef T_return (*call_type)(rep_type*, arg1_type_);
 #endif
 
 public:
+  typedef typename type_trait<T_arg1>::take arg1_type_;
+  typedef T_return (*call_type)(rep_type*, arg1_type_);
+  typedef T_return result_type;
+
   /** Invoke the contained functor unless slot is in blocking state.
    * @param _A_a1 Argument to be passed on to the functor.
    * @return The return value of the functor invocation.
@@ -853,19 +847,16 @@
 class slot <T_return, T_arg1,T_arg2>
   : public slot_base
 {
-public:
-  typedef T_return result_type;
-  typedef typename type_trait<T_arg1>::take arg1_type_;
-  typedef typename type_trait<T_arg2>::take arg2_type_;
-
-
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
   typedef internal::slot_rep rep_type;
-  typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_);
 #endif
 
 public:
+  typedef typename type_trait<T_arg1>::take arg1_type_;
+  typedef typename type_trait<T_arg2>::take arg2_type_;
+  typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_);
+  typedef T_return result_type;
+
   /** Invoke the contained functor unless slot is in blocking state.
    * @param _A_a1 Argument to be passed on to the functor.
    * @param _A_a2 Argument to be passed on to the functor.
@@ -901,20 +892,17 @@
 class slot <T_return, T_arg1,T_arg2,T_arg3>
   : public slot_base
 {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+  typedef internal::slot_rep rep_type;
+#endif
+
 public:
-  typedef T_return result_type;
   typedef typename type_trait<T_arg1>::take arg1_type_;
   typedef typename type_trait<T_arg2>::take arg2_type_;
   typedef typename type_trait<T_arg3>::take arg3_type_;
-
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-  typedef internal::slot_rep rep_type;
   typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_);
-#endif
+  typedef T_return result_type;
 
-public:
   /** Invoke the contained functor unless slot is in blocking state.
    * @param _A_a1 Argument to be passed on to the functor.
    * @param _A_a2 Argument to be passed on to the functor.
@@ -951,21 +939,18 @@
 class slot <T_return, T_arg1,T_arg2,T_arg3,T_arg4>
   : public slot_base
 {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+  typedef internal::slot_rep rep_type;
+#endif
+
 public:
-  typedef T_return result_type;
   typedef typename type_trait<T_arg1>::take arg1_type_;
   typedef typename type_trait<T_arg2>::take arg2_type_;
   typedef typename type_trait<T_arg3>::take arg3_type_;
   typedef typename type_trait<T_arg4>::take arg4_type_;
-
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-  typedef internal::slot_rep rep_type;
   typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_);
-#endif
+  typedef T_return result_type;
 
-public:
   /** Invoke the contained functor unless slot is in blocking state.
    * @param _A_a1 Argument to be passed on to the functor.
    * @param _A_a2 Argument to be passed on to the functor.
@@ -1003,22 +988,19 @@
 class slot <T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
   : public slot_base
 {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+  typedef internal::slot_rep rep_type;
+#endif
+
 public:
-  typedef T_return result_type;
   typedef typename type_trait<T_arg1>::take arg1_type_;
   typedef typename type_trait<T_arg2>::take arg2_type_;
   typedef typename type_trait<T_arg3>::take arg3_type_;
   typedef typename type_trait<T_arg4>::take arg4_type_;
   typedef typename type_trait<T_arg5>::take arg5_type_;
-
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-  typedef internal::slot_rep rep_type;
   typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_);
-#endif
+  typedef T_return result_type;
 
-public:
   /** Invoke the contained functor unless slot is in blocking state.
    * @param _A_a1 Argument to be passed on to the functor.
    * @param _A_a2 Argument to be passed on to the functor.
@@ -1057,23 +1039,20 @@
 class slot <T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
   : public slot_base
 {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+  typedef internal::slot_rep rep_type;
+#endif
+
 public:
-  typedef T_return result_type;
   typedef typename type_trait<T_arg1>::take arg1_type_;
   typedef typename type_trait<T_arg2>::take arg2_type_;
   typedef typename type_trait<T_arg3>::take arg3_type_;
   typedef typename type_trait<T_arg4>::take arg4_type_;
   typedef typename type_trait<T_arg5>::take arg5_type_;
   typedef typename type_trait<T_arg6>::take arg6_type_;
-
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-  typedef internal::slot_rep rep_type;
   typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_,arg6_type_);
-#endif
+  typedef T_return result_type;
 
-public:
   /** Invoke the contained functor unless slot is in blocking state.
    * @param _A_a1 Argument to be passed on to the functor.
    * @param _A_a2 Argument to be passed on to the functor.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]