From b50c5f28b14e2fb14d4de0c088949e1405d22c6a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 11 Jul 2019 22:08:34 +0300 Subject: libcamera: signal: Fix compilation on gcc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Niklas Söderlund --- include/libcamera/signal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/libcamera/signal.h') diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h index d3be3626..8f6db700 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); -- cgit v1.2.1