dawn: Fix GCC build
It's not valid for an explicit template specialization to declare a storage class (`static`). GCC correctly catches this, while Clang is too relaxed. Use C++17's 'inline' instead. The alternative is to push the initializers and values into the cpp file. This breakage was introduced in: https://dawn-review.googlesource.com/c/dawn/+/93604 Bug: dawn:1451 Change-Id: Ib3e61d233e16fd7828f8a2ae0909eedbd24ee52e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94320 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
46583621c0
commit
bf55236e13
|
@ -21,7 +21,7 @@
|
|||
namespace dawn::wire::client {
|
||||
|
||||
template<typename T>
|
||||
static constexpr ObjectType ObjectTypeToTypeEnum = static_cast<ObjectType>(-1);
|
||||
inline constexpr ObjectType ObjectTypeToTypeEnum = static_cast<ObjectType>(-1);
|
||||
|
||||
{% for type in by_category["object"] %}
|
||||
{% set Type = type.name.CamelCase() %}
|
||||
|
@ -41,7 +41,7 @@ namespace dawn::wire::client {
|
|||
}
|
||||
|
||||
template <>
|
||||
static constexpr ObjectType ObjectTypeToTypeEnum<{{Type}}> = ObjectType::{{Type}};
|
||||
inline constexpr ObjectType ObjectTypeToTypeEnum<{{Type}}> = ObjectType::{{Type}};
|
||||
|
||||
{% endfor %}
|
||||
} // namespace dawn::wire::client
|
||||
|
|
Loading…
Reference in New Issue