Fwd: Re: [sigc] [Fwd: libsigc++ 1.9.13 fails on Solaris 9 sparc] [martin-ml hippogriff de]



Here comes the attachment ...

Am 2004.02.19 09:56 schrieb(en) Damien Carbery:
All,

In the first build I did last week I used a tarball from sourceforge. The site was available about an hour after Murrary asked for help.

I downloaded the latest tarball (1.9.14) and attempted to build it on Solaris 9 Update 4 sparc. The attached log shows my environment, configure output and make output.

Thanks a lot!

The errors start with:
"../sigc++/adaptors/lambda/base.h", line 174: Error: Could not find sigc::internal::lambda_core<sigc::internal::lambda_select7, 0>:: lambda_core() to initialize base class.

The wrong template specialization is used because
sigc::is_base_and_derived<> yields a wrong result. Hopefully the reason
is that sizeof(char)==sizeof(double) on your platform. I committed a
patch to cvs that would fix this once and for all. I'm attaching the
patch to this email.

Damien, could you please apply this patch to your copy of libsigc++ 1.9.14 and try again?

Regards,

Martin
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libsigc++2/ChangeLog,v
retrieving revision 1.79
diff -u -3 -r1.79 ChangeLog
--- ChangeLog	14 Feb 2004 19:54:43 -0000	1.79
+++ ChangeLog	19 Feb 2004 21:04:13 -0000
@@ -1,3 +1,9 @@
+2004-02-19  Martin Schulze  <teebaum cvs gnome org>
+
+  * sigc++/type_traits.h: Make is_base_and_derived<> platform independant.
+  * sigc++/adaptors/lambda/macros/base.h.m4: Make lambda_core<> ctors
+  explicit. Remove an unused ctor from lambda_core<T_type, true>.
+
 2004-02-14  Martin Schulze  <teebaum cvs gnome org>
 
   * sigc++/functors/slot_base.h, sigc++/functors/macros/slot.h.m4:
Index: sigc++/type_traits.h
===================================================================
RCS file: /cvs/gnome/libsigc++2/sigc++/type_traits.h,v
retrieving revision 1.7
diff -u -3 -r1.7 type_traits.h
--- sigc++/type_traits.h	1 Nov 2003 00:16:14 -0000	1.7
+++ sigc++/type_traits.h	19 Feb 2004 21:04:14 -0000
@@ -102,9 +102,13 @@
 struct is_base_and_derived
 {
 private:
+  struct big {
+    char memory[64];
+  };
+
   struct test {
-    static double is_base_class_(const void*);
-    static char   is_base_class_(typename type_trait<T_base>::pointer);
+    static big  is_base_class_(const void*);
+    static char is_base_class_(typename type_trait<T_base>::pointer);
   };
 
 public:
Index: sigc++/adaptors/lambda/macros/base.h.m4
===================================================================
RCS file: /cvs/gnome/libsigc++2/sigc++/adaptors/lambda/macros/base.h.m4,v
retrieving revision 1.1
diff -u -3 -r1.1 base.h.m4
--- sigc++/adaptors/lambda/macros/base.h.m4	2 Nov 2003 13:40:57 -0000	1.1
+++ sigc++/adaptors/lambda/macros/base.h.m4	19 Feb 2004 21:04:15 -0000
@@ -64,12 +64,14 @@
 
 FOR(1,CALL_SIZE,[[LAMBDA_DO(%1)]])dnl
   lambda_core() {}
-  lambda_core(const T_type& v)
-    : value_(v) {}
 
-  template <class T1, class T2>
-  lambda_core(const T1& v1, const T2& v2)
-    : value_(v1, v2) {}
+  explicit lambda_core(const T_type& v)
+    : value_(v) {}
+dnl
+dnl  TODO: I have no idea what the following ctor was written for. Remove it?
+dnl  template <class T1, class T2>
+dnl  lambda_core(const T1& v1, const T2& v2)
+dnl    : value_(v1, v2) {}
 
   T_type value_;
 };
@@ -92,7 +94,7 @@
   result_type operator()() const;
 
 FOR(1,CALL_SIZE,[[LAMBDA_DO_VALUE(%1)]])dnl
-  lambda_core(typename type_trait<T_type>::take v)
+  explicit lambda_core(typename type_trait<T_type>::take v)
     : value_(v) {}
 
   T_type value_;
@@ -131,6 +133,7 @@
 
   lambda()
     {}
+
   lambda(typename type_trait<T_type>::take v)
     : internal::lambda_core<T_type>(v) 
     {}


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