mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
libcamera: signal: Fix compilation on gcc
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<!std::is_same<Object, T>> on the template implementation
ensures that it will never be called for an Object instance.
Fixes: 56c2e65300
("libcamera: signal: Fix Object handling in multiple inheritance cases")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
56c2e65300
commit
b50c5f28b1
1 changed files with 1 additions and 2 deletions
|
@ -27,9 +27,8 @@ public:
|
|||
: obj_(obj), object_(object) {}
|
||||
virtual ~SlotBase() {}
|
||||
|
||||
template<typename T>
|
||||
template<typename T, typename std::enable_if<!std::is_same<Object, T>::value>::type * = nullptr>
|
||||
bool match(T *obj) { return obj == obj_; }
|
||||
template<>
|
||||
bool match(Object *object) { return object == object_; }
|
||||
|
||||
void disconnect(SignalBase *signal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue