summaryrefslogtreecommitdiff
path: root/src/wasm
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm')
-rw-r--r--src/wasm/wasm-type.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp
index 7d51cc10e..8467e2176 100644
--- a/src/wasm/wasm-type.cpp
+++ b/src/wasm/wasm-type.cpp
@@ -25,9 +25,11 @@
#include "wasm-features.h"
#include "wasm-type.h"
-template<> class std::hash<std::vector<wasm::Type>> {
+namespace std {
+
+template<> class hash<vector<wasm::Type>> {
public:
- size_t operator()(const std::vector<wasm::Type>& types) const {
+ size_t operator()(const vector<wasm::Type>& types) const {
uint64_t res = wasm::rehash(0, uint32_t(types.size()));
for (auto t : types) {
res = wasm::rehash(res, t.getID());
@@ -36,16 +38,17 @@ public:
}
};
-size_t std::hash<wasm::Type>::operator()(const wasm::Type& type) const {
- return std::hash<uint64_t>{}(type.getID());
+size_t hash<wasm::Type>::operator()(const wasm::Type& type) const {
+ return hash<uint64_t>{}(type.getID());
}
-size_t std::hash<wasm::Signature>::
-operator()(const wasm::Signature& sig) const {
- return wasm::rehash(uint64_t(std::hash<uint64_t>{}(sig.params.getID())),
- uint64_t(std::hash<uint64_t>{}(sig.results.getID())));
+size_t hash<wasm::Signature>::operator()(const wasm::Signature& sig) const {
+ return wasm::rehash(uint64_t(hash<uint64_t>{}(sig.params.getID())),
+ uint64_t(hash<uint64_t>{}(sig.results.getID())));
}
+} // namespace std
+
namespace wasm {
namespace {