2020-07-15 16:13:12 +00:00
|
|
|
From aa4ba19043db1f41bb0982d4b50f4f00151930f4 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Stephan Hartmann <stha09@googlemail.com>
|
|
|
|
Date: Tue, 26 May 2020 15:29:49 +0000
|
|
|
|
Subject: [PATCH] GCC: fix template specialization in content::WebUI
|
|
|
|
|
|
|
|
GCC complains that explicit specialization in non-namespace scope
|
|
|
|
is happening for GetValue. Move the methods outside
|
|
|
|
the class definition.
|
|
|
|
|
|
|
|
Bug: 819294
|
|
|
|
Change-Id: I109472a0b6fa7ddab3529bc92bba680252b40f67
|
|
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128307
|
|
|
|
Reviewed-by: Camille Lamy <clamy@chromium.org>
|
|
|
|
Commit-Queue: Camille Lamy <clamy@chromium.org>
|
|
|
|
Cr-Commit-Position: refs/heads/master@{#771818}
|
|
|
|
---
|
|
|
|
|
2020-06-02 20:41:45 +00:00
|
|
|
diff --git a/content/public/browser/web_ui.h b/content/public/browser/web_ui.h
|
|
|
|
index 4e6aa0e..fa6f10c 100644
|
|
|
|
--- a/content/public/browser/web_ui.h
|
|
|
|
+++ b/content/public/browser/web_ui.h
|
2020-07-15 16:13:12 +00:00
|
|
|
@@ -138,22 +138,6 @@
|
2020-06-02 20:41:45 +00:00
|
|
|
template <typename T>
|
|
|
|
static T GetValue(const base::Value& value);
|
|
|
|
|
|
|
|
- template <>
|
|
|
|
- inline bool GetValue<bool>(const base::Value& value) {
|
|
|
|
- return value.GetBool();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- template <>
|
|
|
|
- inline int GetValue<int>(const base::Value& value) {
|
|
|
|
- return value.GetInt();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- template <>
|
|
|
|
- inline const std::string& GetValue<const std::string&>(
|
|
|
|
- const base::Value& value) {
|
|
|
|
- return value.GetString();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
template <typename Is, typename... Args>
|
|
|
|
struct Call;
|
|
|
|
|
2020-07-15 16:13:12 +00:00
|
|
|
@@ -169,6 +153,22 @@
|
2020-06-02 20:41:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
+template <>
|
|
|
|
+inline bool WebUI::GetValue<bool>(const base::Value& value) {
|
|
|
|
+ return value.GetBool();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+template <>
|
|
|
|
+inline int WebUI::GetValue<int>(const base::Value& value) {
|
|
|
|
+ return value.GetInt();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+template <>
|
|
|
|
+inline const std::string& WebUI::GetValue<const std::string&>(
|
|
|
|
+ const base::Value& value) {
|
|
|
|
+ return value.GetString();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
} // namespace content
|
|
|
|
|
|
|
|
#endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_
|