Commit aa4ba190 authored by Stephan Hartmann's avatar Stephan Hartmann Committed by Commit Bot

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/+/2128307Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Commit-Queue: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771818}
parent fa47a628
......@@ -138,22 +138,6 @@ class CONTENT_EXPORT WebUI {
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;
......@@ -169,6 +153,22 @@ class CONTENT_EXPORT WebUI {
};
};
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_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment