summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Aditya Kumar <appujee@google.com> 2023-10-24 17:06:58 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-10-24 17:06:58 +0000
commit004bccd97cc76abb0bf597f408bd5ddbc8c1cd3a (patch)
tree7d3d6f6f1da7701e8d1de0b478f613b23bc62983
parent3411550782513f8e5356a644953befeb01bf8698 (diff)
parent1c6fe002e37b320594ac76d80dda0b74aedcf7a7 (diff)
Merge "Fix visitor" into main
-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 aa55873aa5..ca5d5a11d5 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 408fbed99e..35d60eaaa2 100644
--- a/services/inputflinger/NotifyArgs.cpp
+++ b/services/inputflinger/NotifyArgs.cpp
@@ -233,7 +233,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...>;