[sigc] Move constructor for slots not selected
- From: Andrejs Hanins <andrejs hanins ubnt com>
- To: libsigc-list gnome org
- Subject: [sigc] Move constructor for slots not selected
- Date: Fri, 23 Oct 2015 15:01:25 +0300
Hi,
I noticed that both in 2.6.1 and current trunk (cabc88f) the move constructor for the slot is not
selected by the compiler (gcc 4.9 and 4.8.4 tried) even in the most trivial case. Take test_slot_move.cc unit
test for example:
sigc::slot<void,int> s2(std::move(s1));
If you now do (bool)s1 it will evaluate to 'true'. Also s1() works and calls foo() as if s1 wasn't moved to
s2. I tried to add traces to slot1 copy and move constructors and indeed only copy constructor is called, but
not move. So, something is wrong here - either compiler bug (unlikely) or some code in the
slot/slot_base/functor_base prevents compiler from selecting move semantics for constructor.
BR, Andrey
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]