mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-09 05:29:17 +00:00
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 {
|
namespace dawn::wire::client {
|
||||||
|
|
||||||
template<typename T>
|
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"] %}
|
{% for type in by_category["object"] %}
|
||||||
{% set Type = type.name.CamelCase() %}
|
{% set Type = type.name.CamelCase() %}
|
||||||
@ -41,7 +41,7 @@ namespace dawn::wire::client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
static constexpr ObjectType ObjectTypeToTypeEnum<{{Type}}> = ObjectType::{{Type}};
|
inline constexpr ObjectType ObjectTypeToTypeEnum<{{Type}}> = ObjectType::{{Type}};
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
} // namespace dawn::wire::client
|
} // namespace dawn::wire::client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user