diff options
| author | Martin Schulze <teebaum@cvs.gnome.org> | 2004-02-27 22:03:06 +0000 |
|---|---|---|
| committer | Martin Schulze <teebaum@src.gnome.org> | 2004-02-27 22:03:06 +0000 |
| commit | 3b79e0b1a04200fefa960ae4084601f2d3976711 (patch) | |
| tree | 0a3514fd2564ac7c65d55d409f2070565e4a37ab | |
| parent | 994d887f6408582d3fdad9968e477b30ba0b098b (diff) | |
| download | sigc++-3b79e0b1a04200fefa960ae4084601f2d3976711.tar.gz | |
Make the unnumbered slot templates' copy ctors use the copy ctors of the
2004-02-27 Martin Schulze <teebaum@cvs.gnome.org>
* sigc++/functors/macros/slot.h.m4: Make the unnumbered slot templates'
copy ctors use the copy ctors of the base class. Fixes bug #24698.
* tests/test_slot.cc: Test copy ctor (Bryan Forbes).
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | sigc++/functors/macros/slot.h.m4 | 6 | ||||
| -rw-r--r-- | tests/test_slot.cc | 3 |
3 files changed, 13 insertions, 2 deletions
@@ -1,5 +1,11 @@ 2004-02-27 Martin Schulze <teebaum@cvs.gnome.org> + * sigc++/functors/macros/slot.h.m4: Make the unnumbered slot templates' + copy ctors use the copy ctors of the base class. Fixes bug #24698. + * tests/test_slot.cc: Test copy ctor (Bryan Forbes). + +2004-02-27 Martin Schulze <teebaum@cvs.gnome.org> + * tests/type_functor_trait.cc: Bring it up-to-date (use sigc::ref). Make it work with the SUN Forte. diff --git a/sigc++/functors/macros/slot.h.m4 b/sigc++/functors/macros/slot.h.m4 index 5355086..624fe35 100644 --- a/sigc++/functors/macros/slot.h.m4 +++ b/sigc++/functors/macros/slot.h.m4 @@ -135,6 +135,8 @@ class slot ifelse($1, $2,,[<LIST(T_return, LOOP(T_arg%1,$1))>]) : public slot$1<LIST(T_return, LOOP(T_arg%1, $1))> { public: + typedef slot$1<LIST(T_return, LOOP(T_arg%1, $1))> parent_type; + inline slot() {} /** Constructs a slot from an arbitrary functor. @@ -142,10 +144,10 @@ public: */ template <class T_functor> slot(const T_functor& _A_func) - : slot$1<LIST(T_return, LOOP(T_arg%1, $1))>(_A_func) {} + : parent_type(_A_func) {} slot(const slot& src) - : slot$1<LIST(T_return, LOOP(T_arg%1, $1))>(src) {} + : parent_type((const parent_type&)src) {} }; ]) diff --git a/tests/test_slot.cc b/tests/test_slot.cc index cd9c926..387a126 100644 --- a/tests/test_slot.cc +++ b/tests/test_slot.cc @@ -40,4 +40,7 @@ int main() sl1 = sl2; sl1(str); std::cout << str << std::endl; + + // test copy ctor + sigc::slot<void,int> s1_clone(s1); } |
