NCBI C++ ToolKit
_hash_fun.h
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /*
2  * Copyright (c) 1996-1998
3  * Silicon Graphics Computer Systems, Inc.
4  *
5  * Permission to use, copy, modify, distribute and sell this software
6  * and its documentation for any purpose is hereby granted without fee,
7  * provided that the above copyright notice appear in all copies and
8  * that both that copyright notice and this permission notice appear
9  * in supporting documentation. Silicon Graphics makes no
10  * representations about the suitability of this software for any
11  * purpose. It is provided "as is" without express or implied warranty.
12  *
13  *
14  * Copyright (c) 1994
15  * Hewlett-Packard Company
16  *
17  * Permission to use, copy, modify, distribute and sell this software
18  * and its documentation for any purpose is hereby granted without fee,
19  * provided that the above copyright notice appear in all copies and
20  * that both that copyright notice and this permission notice appear
21  * in supporting documentation. Hewlett-Packard Company makes no
22  * representations about the suitability of this software for any
23  * purpose. It is provided "as is" without express or implied warranty.
24  *
25  */
26 
27 /* NOTE: This is an internal header file, included by other STL headers.
28  * You should not attempt to use it directly.
29  */
30 
31 #ifndef _STLP_HASH_FUN_H
32 #define _STLP_HASH_FUN_H
33 
34 # ifndef _STLP_CSTDDEF
35 # include <cstddef>
36 # endif
37 
39 
40 template <class _Key> struct hash { };
41 
42 _STLP_TEMPLATE_NULL struct hash<char> {
43  size_t operator()(char __x) const { return __x; }
44 };
45 _STLP_TEMPLATE_NULL struct hash<unsigned char> {
46  size_t operator()(unsigned char __x) const { return __x; }
47 };
48 #ifndef _STLP_NO_SIGNED_BUILTINS
49 _STLP_TEMPLATE_NULL struct hash<signed char> {
50  size_t operator()(unsigned char __x) const { return __x; }
51 };
52 #endif
53 _STLP_TEMPLATE_NULL struct hash<short> {
54  size_t operator()(short __x) const { return __x; }
55 };
56 _STLP_TEMPLATE_NULL struct hash<unsigned short> {
57  size_t operator()(unsigned short __x) const { return __x; }
58 };
60  size_t operator()(int __x) const { return __x; }
61 };
62 _STLP_TEMPLATE_NULL struct hash<unsigned int> {
63  size_t operator()(unsigned int __x) const { return __x; }
64 };
65 _STLP_TEMPLATE_NULL struct hash<long> {
66  size_t operator()(long __x) const { return __x; }
67 };
68 _STLP_TEMPLATE_NULL struct hash<unsigned long> {
69  size_t operator()(unsigned long __x) const { return __x; }
70 };
71 
72 # if defined (_STLP_LONG_LONG)
73 _STLP_TEMPLATE_NULL struct hash<_STLP_LONG_LONG> {
74  size_t operator()(long x) const { return x; }
75 };
76 _STLP_TEMPLATE_NULL struct hash<unsigned _STLP_LONG_LONG> {
77  size_t operator()(unsigned long x) const { return x; }
78 };
79 # endif
80 
82 
83 #endif /* _STLP_HASH_FUN_H */
84 
85 // Local Variables:
86 // mode:C++
87 // End:
unsigned int
A callback function used to compare two keys in a database.
Definition: types.hpp:1210
#define _STLP_TEMPLATE_NULL
Definition: stlp_defs.hpp:125
#define _STLP_BEGIN_NAMESPACE
Definition: stlp_defs.hpp:116
#define _STLP_END_NAMESPACE
Definition: stlp_defs.hpp:117
size_t operator()(char __x) const
Definition: _hash_fun.h:43
size_t operator()(int __x) const
Definition: _hash_fun.h:60
size_t operator()(long __x) const
Definition: _hash_fun.h:66
size_t operator()(short __x) const
Definition: _hash_fun.h:54
size_t operator()(unsigned char __x) const
Definition: _hash_fun.h:50
size_t operator()(unsigned char __x) const
Definition: _hash_fun.h:46
size_t operator()(unsigned int __x) const
Definition: _hash_fun.h:63
size_t operator()(unsigned long __x) const
Definition: _hash_fun.h:69
size_t operator()(unsigned short __x) const
Definition: _hash_fun.h:57
Definition: _hash_fun.h:40
Modified on Sat Dec 09 04:49:07 2023 by modify_doxy.py rev. 669887