소스 검색

Specialize std::hash in namespace std

Lei Zhang 7 년 전
부모
커밋
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 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 {