Re: [sigc] libsigc++ 1.9.13 fails on Solaris 9 sparc
- From: Martin Schulze <martin-ml hippogriff de>
- To: Damien Carbery <Damien Carbery Sun COM>
- Cc: Murray Cumming <murrayc murrayc com>, libsigc-list gnome org
- Subject: Re: [sigc] libsigc++ 1.9.13 fails on Solaris 9 sparc
- Date: Fri, 27 Feb 2004 22:08:17 +0100
Am 2004.02.27 13:39 schrieb(en) Damien Carbery:
Mmm, don't know what happened there.
I hadn't used the patch. I did a 'make clean; make' after using the
patch and it seems to get further.
"../sigc++/visit_each.h", line 113: Error: Overloading ambiguity
between "print::operator()<A>(A*) const" and "print::operator()<A*>
(A*const&) const".
Well, he is right about this. Funny that gcc and MS .NET are more
tolerant about it. The test needed to be updated, anyway. I'm attaching
the corrected file. You can simply replace the old one. I already
committed to cvs. Please try again ...
Thanks!
Martin
Full log attached.
Martin Schulze wrote:
Hi Damien!
My inbox shows that you wrote a response on Tuesday but
you didn't seem to write any text into your mail?!
Could you post again, please?
Regards,
Martin
Am 2004.02.24 20:48 schrieb(en) Damien Carbery:
Am 2004.02.24 13:20 schrieb(en) martin-ml hippogriff de:
Am 24.02.2004 um 10:46 Uhr haben Sie geschrieben:
> That one is good. Output of resulting executable attached.
>
Perfect. I will change the is_base_and_derived template in cvs
accordingly this evening. We have to make sure that this doesn't
break
the MS .NET compiler. Can someone with access to MS .NET check
whether
the file attached to my last mail compiles and post the output of
the
executable, please?
Committed to cvs. A patch attached; it's a trivial change after
all.
Damien, could you give it another try after applying the patch,
please?
Regards,
Martin> Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libsigc++2/ChangeLog,v
retrieving revision 1.80
diff -u -3 -r1.80 ChangeLog
--- ChangeLog 19 Feb 2004 21:05:04 -0000 1.80
+++ ChangeLog 24 Feb 2004 19:44:15 -0000
@@ -1,3 +1,7 @@
+2004-02-24 Martin Schulze <teebaum cvs gnome org>
+
+ * sigc++/type_traits.h: Make is_base_and_derived<> work with the
SUN Forte.
+
2004-02-19 Martin Schulze <teebaum cvs gnome org>
* sigc++/type_traits.h: Make is_base_and_derived<> platform
independant.
Index: sigc++/type_traits.h
===================================================================
RCS file: /cvs/gnome/libsigc++2/sigc++/type_traits.h,v
retrieving revision 1.8
diff -u -3 -r1.8 type_traits.h
--- sigc++/type_traits.h 19 Feb 2004 21:05:09 -0000 1.8
+++ sigc++/type_traits.h 24 Feb 2004 19:44:16 -0000
@@ -107,7 +107,7 @@
};
struct test {
- static big is_base_class_(const void*);
+ static big is_base_class_(...);
static char is_base_class_(typename type_trait<T_base>::
pointer);
};
--
Damien Carbery
Desktop Release Engineer
Sun Microsystems
Email: damien carbery sun com
Ph: +353 1 819-9218
Ext: x 19218
Dublin Bus and Irish Rail timetables for your Palm:
http://bussched.sourceforge.net> Making all in sigc++
make[1]: Entering directory `/export/home/gnome/2.4/nightly/libsigc/
libsigc++2/sigc++'
make all-am
make[2]: Entering directory `/export/home/gnome/2.4/nightly/libsigc/
libsigc++2/sigc++'
source='signal.cc' object='signal.lo' libtool=yes \
depfile='.deps/signal.Plo' tmpdepfile='.deps/signal.TPlo' \
depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --mode=compile CC -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++\" -DVERSION=\"1.9.14\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include -g -c -o
signal.lo `test -f 'signal.cc' || echo './'`signal.cc
mkdir .libs
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c signal.cc -KPIC -DPIC -o .libs/signal.o
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c signal.cc -o signal.o >/dev/null 2>&1
source='trackable.cc' object='trackable.lo' libtool=yes \
depfile='.deps/trackable.Plo' tmpdepfile='.deps/trackable.TPlo' \
depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --mode=compile CC -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++\" -DVERSION=\"1.9.14\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include -g -c -o
trackable.lo `test -f 'trackable.cc' || echo './'`trackable.cc
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c trackable.cc -KPIC -DPIC -o .libs/trackable.o
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c trackable.cc -o trackable.o >/dev/null 2>&1
source='connection.cc' object='connection.lo' libtool=yes \
depfile='.deps/connection.Plo' tmpdepfile='.deps/connection.TPlo' \
depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --mode=compile CC -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++\" -DVERSION=\"1.9.14\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include -g -c -o
connection.lo `test -f 'connection.cc' || echo './'`connection.cc
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c connection.cc -KPIC -DPIC -o .libs/connection.o
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c connection.cc -o connection.o >/dev/null 2>&1
source='functors/slot.cc' object='slot.lo' libtool=yes \
depfile='.deps/slot.Plo' tmpdepfile='.deps/slot.TPlo' \
depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --mode=compile CC -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++\" -DVERSION=\"1.9.14\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include -g -c -o
slot.lo `test -f 'functors/slot.cc' || echo './'`functors/slot.cc
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c functors/slot.cc -KPIC -DPIC -o .libs/slot.o
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c functors/slot.cc -o slot.o >/dev/null 2>&1
source='adaptors/lambda/lambda.cc' object='lambda.lo' libtool=yes \
depfile='.deps/lambda.Plo' tmpdepfile='.deps/lambda.TPlo' \
depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --mode=compile CC -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++\" -DVERSION=\"1.9.14\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include -g -c -o
lambda.lo `test -f 'adaptors/lambda/lambda.cc' || echo
'./'`adaptors/lambda/lambda.cc
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c adaptors/lambda/lambda.cc -KPIC -DPIC -o .libs/lambda.o
CC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsigc++
\"
-DVERSION=\"1.9.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I.. -I.. -I/opt/gnome-2.4/include
-g -c adaptors/lambda/lambda.cc -o lambda.o >/dev/null 2>&1
/bin/bash ../libtool --mode=link CC -g -i -L/opt/gnome-2.4/lib
-R/opt/gnome-2.4/lib -o libsigc-2.0.la -rpath /usr/local/lib
signal.lo trackable.lo connection.lo slot.lo lambda.lo
CC -G -nolib -hlibsigc-2.0.so.0 -o .libs/libsigc-2.0.so.0.0.0
.libs/signal.o .libs/trackable.o .libs/connection.o .libs/slot.o
.libs/lambda.o -R/opt/gnome-2.4/lib -L/opt/gnome-2.4/lib
(cd .libs && rm -f libsigc-2.0.so.0 && ln -s libsigc-2.0.so.0.0.0
libsigc-2.0.so.0)
(cd .libs && rm -f libsigc-2.0.so && ln -s libsigc-2.0.so.0.0.0
libsigc-2.0.so)
CC -xar -o .libs/libsigc-2.0.a signal.o trackable.o connection.o
slot.o lambda.o
creating libsigc-2.0.la
(cd .libs && rm -f libsigc-2.0.la && ln -s ../libsigc-2.0.la
libsigc-2.0.la)
make[2]: Leaving directory `/export/home/gnome/2.4/nightly/libsigc/
libsigc++2/sigc++'
make[1]: Leaving directory `/export/home/gnome/2.4/nightly/libsigc/
libsigc++2/sigc++'
Making all in tests
make[1]: Entering directory `/export/home/gnome/2.4/nightly/libsigc/
libsigc++2/tests'
source='test_trackable.cc' object='test_trackable.o' libtool=no \
depfile='.deps/test_trackable.Po' tmpdepfile='.deps/test_trackable.
TPo'
\
depmode=none /bin/bash ../depcomp \
CC -I. -I. -I.. -I.. -I/opt/gnome-2.4/include -g -c -o
test_trackable.o `test -f 'test_trackable.cc' || echo
'./'`test_trackable.cc
/bin/bash ../libtool --mode=link CC -g -i -L/opt/gnome-2.4/lib
-R/opt/gnome-2.4/lib -o test_trackable test_trackable.o
../sigc++/libsigc-2.0.la
mkdir .libs
CC -g -i -o .libs/test_trackable test_trackable.o
-L/opt/gnome-2.4/lib ../sigc++/.libs/libsigc-2.0.so -R/usr/local/lib
-R/opt/gnome-2.4/lib
creating test_trackable
source='test_deduce_result_type.cc' object='test_deduce_result_type.
o'
libtool=no \
depfile='.deps/test_deduce_result_type.Po'
tmpdepfile='.deps/test_deduce_result_type.TPo' \
depmode=none /bin/bash ../depcomp \
CC -I. -I. -I.. -I.. -I/opt/gnome-2.4/include -g -c -o
test_deduce_result_type.o `test -f 'test_deduce_result_type.cc' ||
echo './'`test_deduce_result_type.cc
/bin/bash ../libtool --mode=link CC -g -i -L/opt/gnome-2.4/lib
-R/opt/gnome-2.4/lib -o test_deduce_result_type
test_deduce_result_type.o ../sigc++/libsigc-2.0.la
CC -g -i -o .libs/test_deduce_result_type test_deduce_result_type.o
-L/opt/gnome-2.4/lib ../sigc++/.libs/libsigc-2.0.so -R/usr/local/lib
-R/opt/gnome-2.4/lib
creating test_deduce_result_type
source='test_functor_trait.cc' object='test_functor_trait.o'
libtool=no \
depfile='.deps/test_functor_trait.Po'
tmpdepfile='.deps/test_functor_trait.TPo' \
depmode=none /bin/bash ../depcomp \
CC -I. -I. -I.. -I.. -I/opt/gnome-2.4/include -g -c -o
test_functor_trait.o `test -f 'test_functor_trait.cc' || echo
'./'`test_functor_trait.cc
"../sigc++/visit_each.h", line 113: Error: Overloading ambiguity
between "print::operator()<A>(A*) const" and
"print::operator()<A*>(A*const&) const".
1 Error(s) detected.
make[1]: *** [test_functor_trait.o] Error 1
make[1]: Leaving directory `/export/home/gnome/2.4/nightly/libsigc/
libsigc++2/tests'
make: *** [all-recursive] Error 1
// -*- c++ -*-
/* Copyright 2002, The libsigc++ Development Team
* Assigned to public domain. Use as you wish without restriction.
*/
#include <iostream>
#include <sigc++/adaptors/bind.h>
#include <sigc++/adaptors/compose.h>
#include <sigc++/functors/mem_fun.h>
#include <sigc++/functors/ptr_fun.h>
class trackable {};
struct A: public trackable { A() {} };
template <class T_type, bool I_derived = sigc::is_base_and_derived<trackable,T_type>::value>
struct with_trackable;
template <class T_type>
struct with_trackable<T_type,false>
{
static void perform(const T_type& t)
{ std::cout << "other" <<std::endl; }
};
template <class T_type>
struct with_trackable<T_type,true>
{
static void perform(const T_type& t)
{ std::cout << "trackable" << std::endl; }
static void perform(T_type* t)
{ std::cout << "trackable*" << std::endl; }
static void perform(const T_type* t)
{ std::cout << "const trackable*" << std::endl; }
};
struct print
{
void operator()(int i) const
{ std::cout << "int: "<< i << std::endl; }
template <class T>
void operator()(const T& t) const
{ with_trackable<T>::perform(t); }
};
void foo(int i,int j,int k)
{}
void bar(int i)
{}
int main()
{
int i=1,j=2,k=3;
A a;
std::cout << "hit all targets" << std::endl;
sigc::visit_each(print(), sigc::compose(sigc::bind(sigc::ptr_fun3(&foo), sigc::ref(a), j), sigc::ptr_fun1(&bar)));
std::cout << "hit all ints" << std::endl;
sigc::visit_each_type<int>(print(),sigc::compose(sigc::bind(sigc::ptr_fun3(&foo), sigc::ref(a), j),sigc::ptr_fun1(&bar)));
std::cout << "hit all trackable" << std::endl;
sigc::visit_each_type<trackable>(print(), sigc::compose(sigc::bind(sigc::ptr_fun3(&foo), sigc::ref(a), j),sigc::ptr_fun1(&bar)));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]