When compiling the library and the test_signal test, I got the following errors. Reading the report from bottom to top, I can see that bar(), defined as int bar(float i) in test_signal.cc, instantiates functor<float,int>, but information about the first parameter, float, or the arg type of bar(), is not conveyed correctly to operator() in adaptor_trait.h. I have inserted the relevant code from h files as /* */ comments below.
(I am on VS 2005) ... sending to list because I could not find where to report the bug. -- Konstantin ================================ Compiling... test_signal.cc d:\vcprojects\libsigc++\sigc++\adaptors\adaptor_trait.h(82) : warning C4244: 'argument' : conversion from 'const int' to 'const float', possible loss of data /* typename deduce_result_type<T_arg1>::type operator()(T_arg1 _A_arg1) const { return functor_(_A_arg1); } */ d:\vcprojects\libsigc++\sigc++\functors\slot.h(137) : see reference to function template instantiation 'int sigc::adaptor_functor<T_functor>::operator ()<const int&>(T_arg1) const' being compiled with [ T_functor=sigc::pointer_functor1<float,int>, T_arg1=const int & ] d:\vcprojects\libsigc++\sigc++\functors\slot.h(133) : while compiling class template member function 'int sigc::internal::slot_call1<T_functor,T_return,T_arg1>::call_it(sigc::internal::slot_rep *,const int &)' with [ T_functor=sigc::pointer_functor1<float,int>, T_return=int, T_arg1=int ] /* static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1) { typedef typed_slot_rep<T_functor> typed_slot; typed_slot *typed_rep = static_cast<typed_slot*>(rep); return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take> (a_1); } */ d:\vcprojects\libsigc++\sigc++\functors\slot.h(529) : see reference to class template instantiation 'sigc::internal::slot_call1<T_functor,T_return,T_arg1>' being compiled with [ T_functor=sigc::pointer_functor1<float,int>, T_return=int, T_arg1=int ] /* template <class T_functor> slot1(const T_functor& _A_func) : slot_base(new internal::typed_slot_rep<T_functor>(_A_func)) { //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc. slot_base::rep_->call_ = internal::slot_call1<T_functor, T_return, T_arg1>::address(); } */ d:\vcprojects\libsigc++\sigc++\functors\slot.h(1156) : see reference to function template instantiation 'sigc::slot1<T_return,T_arg1>::slot1<T_functor>(const T_functor &)' being compiled with [ T_return=int, T_arg1=int, T_functor=sigc::pointer_functor1<float,int> ] /* template <class T_functor> slot(const T_functor& _A_func) : parent_type(_A_func) {} */ d:\vcprojects\libsigc++\tests\test_signal.cc(39) : see reference to function template instantiation 'sigc::slot<T_return,T_arg1>::slot<sigc::pointer_functor1<float,T_return>>(const T_functor &)' being compiled with [ T_return=int, T_arg1=int, T_functor=sigc::pointer_functor1<float,int> ] /* sig.connect(sigc::ptr_fun1(&bar)); */ ===================================== Similat errors when compiling test_compatiblity: ===================================== Compiling... test_compatibility.cc d:\vcprojects\libsigc++\sigc++\functors\slot.h(103) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data d:\vcprojects\libsigc++\sigc++\functors\slot.h(100) : while compiling class template member function 'float sigc::internal::slot_call0<T_functor,T_return>::call_it(sigc::internal::slot_rep *)' with [ T_functor=sigc::bind_return_functor<double,SigC::Slot0<void>>, T_return=float ] d:\vcprojects\libsigc++\sigc++\functors\slot.h(454) : see reference to class template instantiation 'sigc::internal::slot_call0<T_functor,T_return>' being compiled with [ T_functor=sigc::bind_return_functor<double,SigC::Slot0<void>>, T_return=float ] d:\vcprojects\libsigc++\sigc++\functors\slot.h(1129) : see reference to function template instantiation 'sigc::slot0<T_return>::slot0<T_functor>(const T_functor &)' being compiled with [ T_return=float, T_functor=sigc::bind_return_functor<double,SigC::Slot0<void>> ] d:\vcprojects\libsigc++\tests\test_compatibility.cc(94) : see reference to function template instantiation 'sigc::slot<T_return>::slot<sigc::bind_return_functor<double,T_functor>>(const sigc::bind_return_functor<double,T_functor> &)' being compiled with [ T_return=float, T_functor=SigC::Slot0<void> ] ================================= _______________________________________________ libsigc-list mailing list libsigc-list@gnome.org http://mail.gnome.org/mailman/listinfo/libsigc-list