source:
proiecte/swift/trunk/lib/hoard-371/src/heaplayers/util/hash.h
@
176
Last change on this file since 176 was 176, checked in by , 14 years ago | |
---|---|
File size: 400 bytes |
Line | |
---|---|
1 | #ifndef _HL_HASH_H_ |
2 | #define _HL_HASH_H_ |
3 | |
4 | #include <stdlib.h> |
5 | |
6 | namespace HL { |
7 | template <typename Key> |
8 | extern size_t hash (Key k); |
9 | |
10 | template <> |
11 | inline size_t hash (void * v) { |
12 | return (size_t) v; |
13 | } |
14 | |
15 | template <> |
16 | inline size_t hash (const void * v) { |
17 | return (size_t) ((size_t) v); |
18 | } |
19 | |
20 | template <> |
21 | inline size_t hash (int v) { |
22 | return (size_t) v; |
23 | } |
24 | }; |
25 | |
26 | #endif |
Note: See TracBrowser
for help on using the repository browser.