From d6271316157b6478aca068b6f972da7e839fe90a Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Mon, 30 May 2022 18:38:28 +0200 Subject: test_limit_reference.cc: Don't use auto where a slot is required The return values of sigc::bind() and sigc::bind_return() shall be converted to sigc::slot, otherwise automatic disconnection does not work. Fixes #44 --- tests/test_limit_reference.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_limit_reference.cc b/tests/test_limit_reference.cc index 8d1340d..a115d6d 100644 --- a/tests/test_limit_reference.cc +++ b/tests/test_limit_reference.cc @@ -14,6 +14,8 @@ class Base : virtual public sigc::trackable public: Base() {} + Base(const Base& src) = default; + Base& operator=(const Base& src) = default; Base(Base&& src) = delete; Base& operator=(Base&& src) = delete; }; @@ -47,11 +49,11 @@ main(int argc, char* argv[]) handler(); util->check_result(result_stream, "method()"); - auto param = sigc::bind(sigc::slot(), std::ref(*instance)); + sigc::slot param = sigc::bind(sigc::slot(), std::ref(*instance)); param(); util->check_result(result_stream, ""); - auto ret = sigc::bind_return(sigc::slot(), std::ref(*instance)); + sigc::slot ret = sigc::bind_return(sigc::slot(), std::ref(*instance)); ret(); util->check_result(result_stream, ""); -- cgit v1.2.1