Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: mojo/public/cpp/bindings/native_enum.h

Issue 2136733002: Mojo C++ bindings: add a new mode to generator to use native STL/WTF types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@67_new
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/native_enum.h
diff --git a/mojo/public/cpp/bindings/native_enum.h b/mojo/public/cpp/bindings/native_enum.h
index 140045e4a2c61a7b267a7d606d9f37e93c307eb4..08b43b78bf9277da9b74de1dc064be6d89e6f527 100644
--- a/mojo/public/cpp/bindings/native_enum.h
+++ b/mojo/public/cpp/bindings/native_enum.h
@@ -5,6 +5,9 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_NATIVE_ENUM_H_
#define MOJO_PUBLIC_CPP_BINDINGS_NATIVE_ENUM_H_
+#include <functional>
+
+#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/native_enum_data.h"
namespace mojo {
@@ -14,4 +17,12 @@ enum class NativeEnum : int32_t {};
} // namespace mojo
+namespace std {
+
+template <>
+struct hash<mojo::NativeEnum>
+ : public mojo::internal::EnumHashImpl<mojo::NativeEnum> {};
+
+} // namespace std
+
#endif // MOJO_PUBLIC_CPP_BINDINGS_NATIVE_ENUM_H_
« no previous file with comments | « mojo/public/cpp/bindings/map_traits_wtf_hash_map.h ('k') | mojo/public/cpp/bindings/tests/binding_callback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698