From patchwork Thu Jul 11 19:12:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1668 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 899BD60BC8 for ; Thu, 11 Jul 2019 21:13:07 +0200 (CEST) Received: from pendragon.ideasonboard.com (softbank126163157105.bbtec.net [126.163.157.105]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4769331C for ; Thu, 11 Jul 2019 21:13:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1562872387; bh=eUT1q7aVrnzbPZSCMkWORgeVQjwPQIRjfWyOZbK4oFc=; h=From:To:Subject:Date:From; b=MqxQlnIIhjO4niXLr3mnwFkJJ7LPj8IA7pcjpTBTRpL7/i1EW4DZYEf5qzydnfDOy aJxn8gVTV0boGGe5WGOo2CfEjxfX0TNcyK8iJ3bceIJ2ng6mwvXvcKVnvyIcg3YtuG 1Q8K6scwmvgIvGqgdaYW/n8tortGLeckJ614BoNU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Thu, 11 Jul 2019 22:12:35 +0300 Message-Id: <20190711191235.25150-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: signal: Fix compilation on gcc X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2019 19:13:07 -0000 gcc complains that the recently template specialisation of the SlotBase::match() method is invalid as it is in a non-namespace scope. Luckily this can easily be fixed by removing the specialisation for the fully specialised implementation. As an additional safety measure, using std::enable_if> on the template implementation ensures that it will never be called for an Object instance. Fixes: 56c2e653008a ("libcamera: signal: Fix Object handling in multiple inheritance cases") Signed-off-by: Laurent Pinchart --- include/libcamera/signal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h index d3be362637f8..8f6db700cd80 100644 --- a/include/libcamera/signal.h +++ b/include/libcamera/signal.h @@ -27,9 +27,8 @@ public: : obj_(obj), object_(object) {} virtual ~SlotBase() {} - template + template::value>::type * = nullptr> bool match(T *obj) { return obj == obj_; } - template<> bool match(Object *object) { return object == object_; } void disconnect(SignalBase *signal);