2.0.12: 2005-05-06 Régis Duchesne * sigc++/macros/limit_reference.h.m4 (added): * sigc++/Makefile.am: New class that just stores a reference, and makes sure that if the reference derives from trackable, then the trackable reference will be used instead of the derived reference in visit_each(). * sigc++/functors/macros/mem_fun.h.m4: Better fix for bug #169225 by Régis Duchesne and Christian Hammond, based on the new limit_reference class. * sigc++/adaptors/bound_argument.h (added): New class (built upon the new limit_reference class) that handles all 3 kinds of bound arguments: by value, by reference, and by constant reference. References are unwrapped in the bound_argument's constructor. * sigc++/adaptors/macros/bind.h.m4: Fix for bug #302327 by Régis Duchesne. Bound arguments now need to know whether they are passed by reference or not. So bind() now builds bind_functor instances using 'reference_wrapper' types, instead of 'Foo &' types. The bind_functor code is modified to compensate. * sigc++/adaptors/macros/bind_return.h.m4: Similar fix for a similar bug (unfiled) with bound return arguments. * sigc++/reference_wrapper.h: * sigc++/type_traits.h: The reference_wrapper class is only used in bound_argument.h. Put correct but unused code under #if 0. * sigc++/adaptors/lambda/base.h: This file needs reference_wrapper.h, but was incorrectly relying on type_traits.h to include it. * tests/Makefile.am: * tests/test_virtualbase_delete.cc (deleted): * tests/test_virtualbase_delete_ref_param.cc (deleted): * tests/test_limit_reference.cc (added): Replaced test_virtualbase_delete*.cc with a simpler test_limit_reference.cc which checks for all 3 aspects of the same bug in one file. * tests/test_bind_ref.cc: Slots must use 'Foo &' types. We were lucky this broken usage worked before this change. The change in type_traits.h made this bug obvious, by preventing the code to compile. * tests/test_bind_return.cc: After my change, bind() and bind_return() must use 'reference_wrapper' types. * tests/test_custom.cc: Made this test a no-op (so it does not perturb 'make check' on released versions of the library) and made it a template ready to be modified by hackers. 2005-05-01 Murray Cumming * sigc++/functors/slot_base.cc: slot_base::slot_base(src): If the source slot_base has a null rep->call_, meaning that the slot is invalid, just return a default-constructed slot, to prevent the crash shown in tests/tests_copy_invalid_slot.cc. Bug #302515 by Régis Duchesne. 2005-05-01 Murray Cumming * sigc++/functors/macros/mem_fun.h.m4: bound_*<>: Add a new is_base_and_derived parameter to the template and thereby provide a specialization for T_Obj types that derive from sigc::trackable. This prevents a crash when casting from the derived type to sigc::trackable after the derived destructor has run. This cast can sometimes fail when using multiple inheritance, at least with g++. Bug #169225 by Régis Duchesne and Christian Hammond. * sigc++/type_traits.h: Add documenation for the internal is_base_and_derived<> template, which allows us to specialize other templates for certain template types. 2005-04-28 Murray Cumming * sigc++/type_traits.h: Added comments for users of g++ 3.2. 2005-04-28 Murray Cumming * tests/Makefile.am: * tests/test_virtualbase_delete.cc: Added simplified test case from bug #169225. We have a patch to make this succeed but I am not ready to commit it just yet. 2005-04-27 Murray Cumming * tests/Makefile.am: * tests/test_custom.cc: Added a place to put extra test code, so I don't have to keep installing my crazy libsigc++ versions. 2005-04-27 Murray Cumming * sigc++/visit_each.h: Revert back to the non-explicit template call, because we can not specify the template specialization so easily, because the specializations have different numbers of types. * tests/Makefile/am: * tests/test_bind_ref.cc: Add a simple test only for sigc::ref disconnection. 2005-04-26 Murray Cumming * sigc++/visit_each.h: Use the explicit template specialization, needed for Tru64 and AIX compilers. This causes a crash in some uses of sigc::ref() (when using g++ 3.3.4 or 3.3.5 , but not with 3.4) but seems to fix a crash in some uses of multiple inheritance (bug #169225). * tests/test_bind.cc: Comment out the crashing (not with g++ 3.4) use of sigc::ref() with an explanatory comment.