浏览代码

Specialize std::hash in namespace std

Lei Zhang 6 年之前
父节点
当前提交
0fdb0fdbc3
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      include/dxc/HLSL/DxilRuntimeReflection.inl

+ 6 - 6
include/dxc/HLSL/DxilRuntimeReflection.inl

@@ -250,14 +250,14 @@ SubobjectTableReader *DxilRuntimeData::GetSubobjectTableReader() {
 using namespace hlsl;
 using namespace hlsl;
 using namespace RDAT;
 using namespace RDAT;
 
 
-template<>
-struct std::hash<ResourceKey> {
-public:
-  size_t operator()(const ResourceKey& key) const throw() {
-    return (std::hash<uint32_t>()(key.Class) * (size_t)16777619U)
-      ^ std::hash<uint32_t>()(key.ID);
+namespace std {
+template <> struct hash<ResourceKey> {
+  size_t operator()(const ResourceKey &key) const throw() {
+    return (hash<uint32_t>()(key.Class) * (size_t)16777619U) ^
+           hash<uint32_t>()(key.ID);
   }
   }
 };
 };
+} // namespace std
 
 
 namespace {
 namespace {