From aa4ba19043db1f41bb0982d4b50f4f00151930f4 Mon Sep 17 00:00:00 2001 From: Stephan Hartmann 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 Commit-Queue: Camille Lamy Cr-Commit-Position: refs/heads/master@{#771818} --- 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 @@ -138,22 +138,6 @@ template static T GetValue(const base::Value& value); - template <> - inline bool GetValue(const base::Value& value) { - return value.GetBool(); - } - - template <> - inline int GetValue(const base::Value& value) { - return value.GetInt(); - } - - template <> - inline const std::string& GetValue( - const base::Value& value) { - return value.GetString(); - } - template struct Call; @@ -169,6 +153,22 @@ }; }; +template <> +inline bool WebUI::GetValue(const base::Value& value) { + return value.GetBool(); +} + +template <> +inline int WebUI::GetValue(const base::Value& value) { + return value.GetInt(); +} + +template <> +inline const std::string& WebUI::GetValue( + const base::Value& value) { + return value.GetString(); +} + } // namespace content #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_