summaryrefslogtreecommitdiffstats
path: root/recipes-wam/cef/files/chromium/0023-M118-fix-Add-missing-typename-keyword-in-multiple-st.patch
blob: ea0b2c59f4d3e8d233cf73a4b197b669a78f7577 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
From a1077aa6d029f729143727ab8d25f85121f871a3 Mon Sep 17 00:00:00 2001
From: Roger Zanoni <rzanoni@igalia.com>
Date: Thu, 26 Oct 2023 07:43:26 -0300
Subject: [PATCH 23/33] [M118-fix] Add missing 'typename' keyword in multiple
 statements

Add the typename keywork where it's needed as this causes build issues
in clang 14.

Upstream-Status: Inappropriate
Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
---
 .../optimization_guide/core/tflite_model_executor.h       | 8 ++++----
 components/supervised_user/core/browser/proto_fetcher.cc  | 6 +++---
 components/supervised_user/core/browser/proto_fetcher.h   | 4 ++--
 ui/base/interaction/interactive_test_internal.h           | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/components/optimization_guide/core/tflite_model_executor.h b/components/optimization_guide/core/tflite_model_executor.h
index 027ae8e101634..a256a85322e54 100644
--- a/components/optimization_guide/core/tflite_model_executor.h
+++ b/components/optimization_guide/core/tflite_model_executor.h
@@ -262,7 +262,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
   // Starts the synchronous execution of the model. Returns model outputs.
   // Model needs to be loaded. Synchronous calls do not load or unload model.
   std::vector<absl::optional<OutputType>> SendForBatchExecutionSync(
-      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
+      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
       override {
     DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -417,7 +417,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
   // executes it on the model execution thread.
   void LoadModelFileAndBatchExecute(
       BatchExecutionCallback callback_on_complete,
-      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
+      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
     DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
@@ -434,7 +434,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
 
   // Batch executes the loaded model for inputs.
   void BatchExecuteLoadedModel(
-      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
       std::vector<absl::optional<OutputType>>* outputs) {
     DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -494,7 +494,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
   // Unloads the model if needed.
   void BatchExecuteLoadedModelAndRunCallback(
       BatchExecutionCallback callback_on_complete,
-      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
       ExecutionStatus execution_status) {
     DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/components/supervised_user/core/browser/proto_fetcher.cc b/components/supervised_user/core/browser/proto_fetcher.cc
index 9c8e7b5cb88f4..92a614d75b579 100644
--- a/components/supervised_user/core/browser/proto_fetcher.cc
+++ b/components/supervised_user/core/browser/proto_fetcher.cc
@@ -399,7 +399,7 @@ class RetryingFetcherImpl final : public DeferredFetcherImpl<Response> {
   RetryingFetcherImpl(const RetryingFetcherImpl&) = delete;
   RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete;
 
-  void Start(ProtoFetcher<Response>::Callback callback) override {
+  void Start(typename ProtoFetcher<Response>::Callback callback) override {
     callback_ = std::move(callback);
     Retry();
   }
@@ -435,7 +435,7 @@ class RetryingFetcherImpl final : public DeferredFetcherImpl<Response> {
   }
 
   // Client callback.
-  ProtoFetcher<Response>::Callback callback_;
+  typename ProtoFetcher<Response>::Callback callback_;
 
   // Retry controls.
   base::OneShotTimer timer_;
@@ -578,7 +578,7 @@ ParallelFetchManager<Request, Response>::ParallelFetchManager(
 template <typename Request, typename Response>
 void ParallelFetchManager<Request, Response>::Fetch(
     const Request& request,
-    Fetcher::Callback callback) {
+    typename Fetcher::Callback callback) {
   CHECK(callback) << "Use base::DoNothing() instead of empty callback.";
   KeyType key = requests_in_flight_.Add(MakeFetcher(request));
   requests_in_flight_.Lookup(key)->Start(
diff --git a/components/supervised_user/core/browser/proto_fetcher.h b/components/supervised_user/core/browser/proto_fetcher.h
index 8266c99d78a7a..9c41978aea68e 100644
--- a/components/supervised_user/core/browser/proto_fetcher.h
+++ b/components/supervised_user/core/browser/proto_fetcher.h
@@ -165,10 +165,10 @@ class ParallelFetchManager {
 
   // Starts the fetch. Underlying fetcher is stored internally, and will be
   // cleaned up after finish or when this manager is destroyed.
-  void Fetch(const Request& request, Fetcher::Callback callback);
+  void Fetch(const Request& request, typename Fetcher::Callback callback);
 
  private:
-  using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
+  using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
 
   // Remove fetcher under key from requests_in_flight_.
   void Remove(KeyType key);
diff --git a/ui/base/interaction/interactive_test_internal.h b/ui/base/interaction/interactive_test_internal.h
index 080152fa265cd..a3c9b22f79487 100644
--- a/ui/base/interaction/interactive_test_internal.h
+++ b/ui/base/interaction/interactive_test_internal.h
@@ -108,7 +108,7 @@ class InteractiveTestPrivate {
 
   // Adds `state_observer` and associates it with an element with identifier
   // `id` and context `context`.
-  template <typename Observer, typename V = Observer::ValueType>
+  template <typename Observer, typename V = typename Observer::ValueType>
   void AddStateObserver(ElementIdentifier id,
                         ElementContext context,
                         std::unique_ptr<Observer> state_observer);
@@ -457,7 +457,7 @@ struct ArgsExtractor<R(Args...)> {
 };
 
 template <typename F>
-using ReturnTypeOf = MaybeBindTypeHelper<F>::ReturnType;
+using ReturnTypeOf = typename MaybeBindTypeHelper<F>::ReturnType;
 
 template <size_t N, typename F>
 using NthArgumentOf = std::tuple_element_t<
@@ -556,7 +556,7 @@ struct MatcherTypeHelper<const char16_t[]> {
 };
 
 template <typename T>
-using MatcherTypeFor = MatcherTypeHelper<std::remove_cvref_t<T>>::ActualType;
+using MatcherTypeFor = typename MatcherTypeHelper<std::remove_cvref_t<T>>::ActualType;
 
 template <typename T>
 class IsMatcherHelper {
-- 
2.42.1