summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Aditya Kumar <appujee@google.com> 2023-10-24 18:29:51 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-10-24 18:29:51 +0000
commitc52013820122fe463112f46286667cc9686c5ac7 (patch)
tree4f86588df8d20c0b8b0fc839ecf91113e6351019
parent32a061e2aab426bccc23b66cfa0f1ed60d321971 (diff)
parentfe9a892ab4d4639c7521335cf27f1b695b8fcafb (diff)
Merge "Fix visitor" into main am: 004bccd97c am: d83c544d81 am: fe9a892ab4
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2800293 Change-Id: Ic8b367a90faa2c13bf8fae1302dfb97a8db3fc6c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/inputflinger/InputListener.cpp2
-rw-r--r--services/inputflinger/NotifyArgs.cpp2
-rw-r--r--services/inputflinger/reader/mapper/gestures/PropertyProvider.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/services/inputflinger/InputListener.cpp b/services/inputflinger/InputListener.cpp
index 1f17c165d5..016ae045a9 100644
--- a/services/inputflinger/InputListener.cpp
+++ b/services/inputflinger/InputListener.cpp
@@ -39,7 +39,7 @@ std::list<NotifyArgs>& operator+=(std::list<NotifyArgs>& keep, std::list<NotifyA
// Helper to std::visit with lambdas.
template <typename... V>
-struct Visitor : V... {};
+struct Visitor : V... { using V::operator()...; };
// explicit deduction guide (not needed as of C++20)
template <typename... V>
Visitor(V...) -> Visitor<V...>;
diff --git a/services/inputflinger/NotifyArgs.cpp b/services/inputflinger/NotifyArgs.cpp
index c34cd5346e..de836e93a4 100644
--- a/services/inputflinger/NotifyArgs.cpp
+++ b/services/inputflinger/NotifyArgs.cpp
@@ -190,7 +190,7 @@ NotifyPointerCaptureChangedArgs::NotifyPointerCaptureChangedArgs(
// Helper to std::visit with lambdas.
template <typename... V>
-struct Visitor : V... {};
+struct Visitor : V... { using V::operator()...; };
// explicit deduction guide (not needed as of C++20)
template <typename... V>
Visitor(V...) -> Visitor<V...>;
diff --git a/services/inputflinger/reader/mapper/gestures/PropertyProvider.cpp b/services/inputflinger/reader/mapper/gestures/PropertyProvider.cpp
index be2bfed691..69264f84ed 100644
--- a/services/inputflinger/reader/mapper/gestures/PropertyProvider.cpp
+++ b/services/inputflinger/reader/mapper/gestures/PropertyProvider.cpp
@@ -239,7 +239,7 @@ namespace {
// Helper to std::visit with lambdas.
template <typename... V>
-struct Visitor : V... {};
+struct Visitor : V... { using V::operator()...; };
// explicit deduction guide (not needed as of C++20)
template <typename... V>
Visitor(V...) -> Visitor<V...>;