All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pointerHash.h
Go to the documentation of this file.
1 /* pointerHash.h
2  */
3 #ifndef STL_POINTERHASH_H
4 #define STL_POINTERHASH_H
5 
6 namespace osl
7 {
8  namespace stl
9  {
10  template <class T>
11  struct hash;
12  template <class T> struct hash<T*>
13  {
14  size_t operator()(const T *pointer) const
15  {
16  return reinterpret_cast<size_t>(pointer)/8;
17  }
18  };
19  } // namespace stl
20 } // namespace osl
21 
22 #endif /* STL_POINTERHASH_H */
23 // ;;; Local Variables:
24 // ;;; mode:c++
25 // ;;; c-basic-offset:2
26 // ;;; End: