Eliminated the Unique class in favor of NonCopyable and NonCopyableV
[oota-llvm.git] / include / llvm / Support / HashExtras.h
1 //===-- HashExtras.h - Useful functions for STL hash containers --*- C++ -*--=//
2 //
3 // This file contains some templates that are useful if you are working with the
4 // STL Hashed containers.
5 //
6 // No library is required when using these functinons.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_SUPPORT_HASHEXTRAS_H
11 #define LLVM_SUPPORT_HASHEXTRAS_H
12
13 #include <string>
14 #include <hash_map>
15
16 template <> struct hash<string> {
17   size_t operator()(string const &str) const {
18     return hash<char const *>()(str.c_str());
19   }
20 };
21
22 #endif