Index: mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl |
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl |
index 36856e8f601e8bb50b3b52d7aff2169aabb64ecc..0a446a7cb9abb307e62c14e6e4139a38c0bff2d0 100644 |
--- a/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl |
+++ b/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl |
@@ -75,3 +75,9 @@ inline bool IsKnownEnumValue({{enum|get_name_for_kind}} value) { |
static_cast<int32_t>(value)); |
} |
{%- endmacro %} |
+ |
+{%- macro enum_hash(enum) %} |
+template <> |
+struct hash<{{enum|get_qualified_name_for_kind}}> |
+ : public mojo::internal::EnumHashImpl<{{enum|get_qualified_name_for_kind}}> {}; |
+{%- endmacro %} |