diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2015-10-21 18:43:56 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2015-10-21 18:43:56 +0200 |
commit | cabc88f6c2e25432a8e6245c5af114ebb0de04b8 (patch) | |
tree | 95f1e0ca97aa8ec2724523599dfe1f83bba04f77 /tests/test_signal_move.cc | |
parent | 02339149a28e26151402076e8cf1abd00f7dd92b (diff) | |
download | sigc++-cabc88f6c2e25432a8e6245c5af114ebb0de04b8.tar.gz |
slot and signal: Fix move constructors and move assignments
* sigc++/functors/macros/slot.h.m4: Add documentation.
* sigc++/functors/slot_base.[h|cc]: Fix the move operators of slot_base.
Don't move a connected slot.
* sigc++/signal_base.cc: Fix the move assignment of signal_base.
* tests/test_signal_move.cc:
* tests/test_slot_move.cc: Really test move assignment. Bug #756484.
Diffstat (limited to 'tests/test_signal_move.cc')
-rw-r--r-- | tests/test_signal_move.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_signal_move.cc b/tests/test_signal_move.cc index db60b56..73a7ed2 100644 --- a/tests/test_signal_move.cc +++ b/tests/test_signal_move.cc @@ -1,4 +1,3 @@ -// -*- c++ -*- /* Copyright 2015, The libsigc++ Development Team * Assigned to public domain. Use as you wish without restriction. */ @@ -38,11 +37,14 @@ int main(int argc, char* argv[]) //Test the move constructor: sigc::signal<int, int> sig2(std::move(sig)); + //sig(-2); Add when more move constructors have been added sig2(2); util->check_result(result_stream, "foo(int 2)"); //Test the move assignment operator: - sigc::signal<int, int> sig3 = std::move(sig2); + sigc::signal<int, int> sig3; + sig3 = std::move(sig2); + //sig2(-3); Add when more move assignment operators have been added sig3(3); util->check_result(result_stream, "foo(int 3)"); |