summaryrefslogtreecommitdiff
path: root/doc/html/hash/reference.html
blob: 0435cf4c4b4ed37bb2741b9331d45d854aec1984 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Reference</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../hash.html" title="Chapter&#160;13.&#160;Boost.Functional/Hash">
<link rel="prev" href="rationale.html" title="Rationale">
<link rel="next" href="../boost/hash.html" title="Struct template hash">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="rationale.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../hash.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost/hash.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="hash.reference"></a>Reference</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="reference.html#hash.reference.specification"></a></span></dt>
<dt><span class="section"><a href="reference.html#header.boost.functional.hash_hpp">Header &lt;boost/functional/hash.hpp&gt;</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"></div>
<p>For the full specification, see section 6.3 of the
        <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">C++ Standard Library Technical Report</a>
        and issue 6.18 of the
        <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1837.pdf" target="_top">Library Extension Technical Report Issues List</a> (page 63).
    </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="header.boost.functional.hash_hpp"></a>Header &lt;<a href="../../../boost/functional/hash.hpp" target="_top">boost/functional/hash.hpp</a>&gt;</h3></div></div></div>
<p>
      Defines <code class="computeroutput"><a class="link" href="../boost/hash.html" title="Struct template hash">boost::hash</a></code>,
      and helper functions.
    </p>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash.html" title="Struct template hash">hash</a><span class="special">;</span>

  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_bool_idp83736416.html" title="Struct hash&lt;bool&gt;">hash</a><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_char_idp83257968.html" title="Struct hash&lt;char&gt;">hash</a><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_signed_ch_idp83187984.html" title="Struct hash&lt;signed char&gt;">hash</a><span class="special">&lt;</span><span class="keyword">signed</span> <span class="keyword">char</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_unsigned__idp79751808.html" title="Struct hash&lt;unsigned char&gt;">hash</a><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_wchar_t_idp81445840.html" title="Struct hash&lt;wchar_t&gt;">hash</a><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_short_idp42387488.html" title="Struct hash&lt;short&gt;">hash</a><span class="special">&lt;</span><span class="keyword">short</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_unsigned__idp70747664.html" title="Struct hash&lt;unsigned short&gt;">hash</a><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">short</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_int_idp42821056.html" title="Struct hash&lt;int&gt;">hash</a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_unsigned__idp42827744.html" title="Struct hash&lt;unsigned int&gt;">hash</a><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_long_idp8226416.html" title="Struct hash&lt;long&gt;">hash</a><span class="special">&lt;</span><span class="keyword">long</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_unsigned__idp83509360.html" title="Struct hash&lt;unsigned long&gt;">hash</a><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_long_long_idp43468240.html" title="Struct hash&lt;long long&gt;">hash</a><span class="special">&lt;</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_unsigned__idp76917888.html" title="Struct hash&lt;unsigned long long&gt;">hash</a><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">long</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_float_idp66501232.html" title="Struct hash&lt;float&gt;">hash</a><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_double_idp71324128.html" title="Struct hash&lt;double&gt;">hash</a><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_long_doub_idp64704912.html" title="Struct hash&lt;long double&gt;">hash</a><span class="special">&lt;</span><span class="keyword">long</span> <span class="keyword">double</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_std_string_idp6357360.html" title="Struct hash&lt;std::string&gt;">hash</a><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_std_wstri_idp11958816.html" title="Struct hash&lt;std::wstring&gt;">hash</a><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_T_idp11965504.html" title="Struct template hash&lt;T*&gt;">hash</a><span class="special">&lt;</span><span class="identifier">T</span><span class="special">*</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/hash_std_type__idp66348816.html" title="Struct hash&lt;std::type_index&gt;">hash</a><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">type_index</span><span class="special">&gt;</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="reference.html#idp79717568-bb">Support functions (Boost extension).</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="reference.html#boost.hash_combine"><span class="identifier">hash_combine</span></a><span class="special">(</span><span class="identifier">size_t</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp67438016-bb"><span class="identifier">hash_range</span></a><span class="special">(</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">It</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="reference.html#idp67441616-bb"><span class="identifier">hash_range</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">&amp;</span><span class="special">,</span> <span class="identifier">It</span><span class="special">,</span> <span class="identifier">It</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="reference.html#idp6283424-bb">Overloadable hash implementation (Boost extension).</a></span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp6285344-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">bool</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp6287088-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">char</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp6288832-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">signed</span> <span class="keyword">char</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp85643072-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp85644816-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">wchar_t</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp85646560-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">short</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp85648304-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">short</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp85650048-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp61858832-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp61860576-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">long</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp61862320-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp61864064-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp61865808-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">long</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp61867552-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">float</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp66284832-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">double</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp66286576-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">long</span> <span class="keyword">double</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp66288320-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">unsigned</span> N<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp66290752-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">T</span> <span class="special">(</span><span class="special">&amp;</span><span class="identifier">val</span><span class="special">)</span><span class="special">[</span><span class="identifier">N</span><span class="special">]</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">unsigned</span> N<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp86523712-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span> <span class="special">(</span><span class="special">&amp;</span><span class="identifier">val</span><span class="special">)</span><span class="special">[</span><span class="identifier">N</span><span class="special">]</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Ch<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp86527040-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">Ch</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">Ch</span><span class="special">&gt;</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> A<span class="special">,</span> <span class="keyword">typename</span> B<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp86530640-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp73125952-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp73129280-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp73132592-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">deque</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> K<span class="special">,</span> <span class="keyword">typename</span> C<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp17558848-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">C</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> K<span class="special">,</span> <span class="keyword">typename</span> C<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp17562736-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">multiset</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">C</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> K<span class="special">,</span> <span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> C<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp17566624-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">C</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> K<span class="special">,</span> <span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> C<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp42832656-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">multimap</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">C</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp42837104-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp83198624-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">type_index</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> N<span class="special">&gt;</span> 
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp83200368-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">N</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> T<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="reference.html#idp83204288-bb"><span class="identifier">hash_value</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">...</span><span class="special">&gt;</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span></pre>
<div class="refsect2">
<a name="idp139583504"></a><h3>
<a name="idp79717568-bb"></a><code class="computeroutput"></code> Support functions (Boost extension).</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">void</span> <a name="boost.hash_combine"></a><span class="identifier">hash_combine</span><span class="special">(</span><span class="identifier">size_t</span> <span class="special">&amp;</span> seed<span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> v<span class="special">)</span><span class="special">;</span></pre>
<p class="simpara">
            Called repeatedly to incrementally create a hash value from
            several variables.
        </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Effects:</span></p></td>
<td>
            Updates <code class="computeroutput">seed</code> with a new hash value generated by
            combining it with the result of
            <code class="computeroutput"><a class="link" href="reference.html#boost.hash_value_idp6284240">hash_value</a>(v)</code>. Will
            always produce the same result for the same combination of
            <code class="computeroutput">seed</code> and
            <code class="computeroutput"><a class="link" href="reference.html#boost.hash_value_idp6284240">hash_value</a>(v)</code> during
            the single run of a program.
        </td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p><a class="link" href="reference.html#boost.hash_value_idp6284240">hash_value</a> is called without
          qualification, so that overloads can be found via ADL.</p>
<p>This is an extension to TR1</p>
<p>
            Forward declared in
            <code class="computeroutput">&lt;boost/functional/hash_fwd.hpp&gt;</code>
          </p>
<p>
            This hash function is not intended for general use, and isn't
            guaranteed to be equal during separate runs of a program - so
            please don't use it for any persistent storage or communication.
          </p>
</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>
          Only throws if <a class="link" href="reference.html#boost.hash_value_idp6284240">hash_value</a>(T) throws.
          Strong exception safety, as long as <a class="link" href="reference.html#boost.hash_value_idp6284240">hash_value</a>(T)
          also has strong exception safety.
        </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<p><a name="boost.hash_range_idp67437456"></a></p>
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp67438016-bb"></a><span class="identifier">hash_range</span><span class="special">(</span><span class="identifier">It</span> first<span class="special">,</span> <span class="identifier">It</span> last<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="keyword">void</span> <a name="idp67441616-bb"></a><span class="identifier">hash_range</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">&amp;</span> seed<span class="special">,</span> <span class="identifier">It</span> first<span class="special">,</span> <span class="identifier">It</span> last<span class="special">)</span><span class="special">;</span></pre>
<p class="simpara">
            Calculate the combined hash value of the elements of an iterator
            range.
        </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Effects:</span></p></td>
<td>
<p>For the two argument overload:
</p>
<pre class="programlisting">
<span class="identifier">size_t</span> <span class="identifier">seed</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>

<span class="keyword">for</span><span class="special">(</span><span class="special">;</span> <span class="identifier">first</span> <span class="special">!=</span> <span class="identifier">last</span><span class="special">;</span> <span class="special">++</span><span class="identifier">first</span><span class="special">)</span>
<span class="special">{</span>
    <a class="link" href="reference.html#boost.hash_combine">hash_combine</a><span class="special">(</span><span class="identifier">seed</span><span class="special">,</span> <span class="special">*</span><span class="identifier">first</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span>

<span class="keyword">return</span> <span class="identifier">seed</span><span class="special">;</span>
</pre>
<p>
          </p>
<p>For the three arguments overload:</p>
<pre class="programlisting">
<span class="keyword">for</span><span class="special">(</span><span class="special">;</span> <span class="identifier">first</span> <span class="special">!=</span> <span class="identifier">last</span><span class="special">;</span> <span class="special">++</span><span class="identifier">first</span><span class="special">)</span>
<span class="special">{</span>
    <a class="link" href="reference.html#boost.hash_combine">hash_combine</a><span class="special">(</span><span class="identifier">seed</span><span class="special">,</span> <span class="special">*</span><span class="identifier">first</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span>
</pre>
</td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>
            <code class="computeroutput">hash_range</code> is sensitive to the order of the elements
            so it wouldn't be appropriate to use this with an unordered
            container.
          </p>
<p>This is an extension to TR1</p>
<p>
            Forward declared in
            <code class="computeroutput">&lt;boost/functional/hash_fwd.hpp&gt;</code>
          </p>
<p>
            This hash function is not intended for general use, and isn't
            guaranteed to be equal during separate runs of a program - so
            please don't use it for any persistent storage or communication.
          </p>
</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>
          Only throws if <code class="computeroutput"><a class="link" href="reference.html#boost.hash_value_idp6284240">hash_value</a>(std::iterator_traits&lt;It&gt;::value_type)</code>
          throws. <code class="computeroutput">hash_range(std::size_t&amp;, It, It)</code> has basic exception safety as long as
          <code class="computeroutput"><a class="link" href="reference.html#boost.hash_value_idp6284240">hash_value</a>(std::iterator_traits&lt;It&gt;::value_type)</code>
          has basic exception safety.
        </p></td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="idp139670384"></a><h3>
<a name="idp6283424-bb"></a><code class="computeroutput"></code> Overloadable hash implementation (Boost extension).</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<p><a name="boost.hash_value_idp6284240"></a></p>
<pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp6285344-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">bool</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp6287088-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">char</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp6288832-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">signed</span> <span class="keyword">char</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp85643072-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">char</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp85644816-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">wchar_t</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp85646560-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">short</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp85648304-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">short</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp85650048-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">int</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp61858832-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp61860576-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">long</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp61862320-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">long</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp61864064-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">long</span> <span class="keyword">long</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp61865808-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">long</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp61867552-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">float</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp66284832-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">double</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp66286576-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">long</span> <span class="keyword">double</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp66288320-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">unsigned</span> N<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp66290752-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">T</span> <span class="special">(</span><span class="special">&amp;</span><span class="identifier">val</span><span class="special">)</span><span class="special">[</span><span class="identifier">N</span><span class="special">]</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">unsigned</span> N<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp86523712-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span> <span class="special">(</span><span class="special">&amp;</span><span class="identifier">val</span><span class="special">)</span><span class="special">[</span><span class="identifier">N</span><span class="special">]</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Ch<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp86527040-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">Ch</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">Ch</span><span class="special">&gt;</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> A<span class="special">,</span> <span class="keyword">typename</span> B<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp86530640-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp73125952-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp73129280-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp73132592-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">deque</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> K<span class="special">,</span> <span class="keyword">typename</span> C<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp17558848-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">C</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> K<span class="special">,</span> <span class="keyword">typename</span> C<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp17562736-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">multiset</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">C</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> K<span class="special">,</span> <span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> C<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp17566624-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">C</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> K<span class="special">,</span> <span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> C<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp42832656-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">multimap</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">C</span><span class="special">,</span> <span class="identifier">A</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp42837104-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp83198624-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">type_index</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> N<span class="special">&gt;</span> 
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp83200368-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">N</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> T<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp83204288-bb"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">...</span><span class="special">&gt;</span> val<span class="special">)</span><span class="special">;</span></pre>
<p class="simpara">
            Implementation of the hash function.
        </p>
<p>
          Generally shouldn't be called directly by users, instead they should use
          <code class="computeroutput"><a class="link" href="../boost/hash.html" title="Struct template hash">boost::hash</a></code>, <code class="computeroutput"><a class="link" href="reference.html#boost.hash_range_idp67437456">boost::hash_range</a></code>
          or <code class="computeroutput"><a class="link" href="reference.html#boost.hash_combine">boost::hash_combine</a></code> which
          call <code class="computeroutput">hash_value</code> without namespace qualification so that overloads
          for custom types are found via ADL.
        </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>This is an extension to TR1</p>
<p>
            This hash function is not intended for general use, and isn't
            guaranteed to be equal during separate runs of a program - so
            please don't use it for any persistent storage or communication.
          </p>
</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>
            Only throws if a user supplied version of
            <code class="computeroutput"><a class="link" href="reference.html#boost.hash_value_idp6284240">hash_value</a></code>
            throws for an element of a container, or
            one of the types stored in a pair.
        </td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>Types</th>
<th>Returns</th>
</tr></thead>
<tbody>
<tr>
<td>
<code class="computeroutput">bool</code>,
                    <code class="computeroutput">char</code>, <code class="computeroutput">signed char</code>, <code class="computeroutput">unsigned char</code>, <code class="computeroutput">wchar_t</code>,
                    <code class="computeroutput">short</code>, <code class="computeroutput">unsigned short</code>,
                    <code class="computeroutput">int</code>, <code class="computeroutput">unsigned int</code>, <code class="computeroutput">long</code>, <code class="computeroutput">unsigned long</code>
                  </td>
<td><code class="computeroutput">val</code></td>
</tr>
<tr>
<td>
<code class="computeroutput">long long</code>, <code class="computeroutput">unsigned long long</code>
</td>
<td>
<code class="computeroutput">val</code> when <code class="computeroutput">abs(val) &lt;= std::numeric_limits&lt;std::size_t&gt;::max()</code>.</td>
</tr>
<tr>
<td>
<code class="computeroutput">float</code>, <code class="computeroutput">double</code>, <code class="computeroutput">long double</code>
</td>
<td>An unspecified value, except that equal arguments shall yield the same result.</td>
</tr>
<tr>
<td><code class="computeroutput">T*</code></td>
<td>An unspecified value, except that equal arguments shall yield the same result.</td>
</tr>
<tr>
<td>
                    <code class="computeroutput">T&#160;val[N]</code>,
                    <code class="computeroutput">const&#160;T&#160;val[N]</code>
                  </td>
<td><code class="computeroutput">hash_range(val, val+N)</code></td>
</tr>
<tr>
<td>
                    <code class="computeroutput">std:basic_string&lt;Ch,&#160;std::char_traits&lt;Ch&gt;,&#160;A&gt;</code>,
                    <code class="computeroutput">std::vector&lt;T,&#160;A&gt;</code>,
                    <code class="computeroutput">std::list&lt;T,&#160;A&gt;</code>,
                    <code class="computeroutput">std::deque&lt;T,&#160;A&gt;</code>,
                    <code class="computeroutput">std::set&lt;K,&#160;C,&#160;A&gt;</code>,
                    <code class="computeroutput">std::multiset&lt;K,&#160;C,&#160;A&gt;</code>,
                    <code class="computeroutput">std::map&lt;K,&#160;T,&#160;C,&#160;A&gt;</code>,
                    <code class="computeroutput">std::multimap&lt;K,&#160;T,&#160;C,&#160;A&gt;</code>,
                    <code class="computeroutput">std::array&lt;T,&#160;N&gt;</code>
                  </td>
<td><code class="computeroutput">hash_range(val.begin(), val.end())</code></td>
</tr>
<tr>
<td><code class="computeroutput">std::pair&lt;A, B&gt;</code></td>
<td><pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">size_t</span> <span class="identifier">seed</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
<a class="link" href="reference.html#boost.hash_combine">hash_combine</a><span class="special">(</span><span class="identifier">seed</span><span class="special">,</span> <span class="identifier">val</span><span class="special">.</span><span class="identifier">first</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="reference.html#boost.hash_combine">hash_combine</a><span class="special">(</span><span class="identifier">seed</span><span class="special">,</span> <span class="identifier">val</span><span class="special">.</span><span class="identifier">second</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">return</span> <span class="identifier">seed</span><span class="special">;</span></pre></td>
</tr>
<tr>
<td><code class="computeroutput">std::tuple&lt;T...&gt;</code></td>
<td><pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">size_t</span> <span class="identifier">seed</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
<a class="link" href="reference.html#boost.hash_combine">hash_combine</a><span class="special">(</span><span class="identifier">seed</span><span class="special">,</span> <span class="identifier">get</span><span class="special">&lt;</span><span class="number">0</span><span class="special">&gt;</span><span class="special">(</span><span class="identifier">val</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="reference.html#boost.hash_combine">hash_combine</a><span class="special">(</span><span class="identifier">seed</span><span class="special">,</span> <span class="identifier">get</span><span class="special">&lt;</span><span class="number">1</span><span class="special">&gt;</span><span class="special">(</span><span class="identifier">val</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// ....</span>
<span class="keyword">return</span> <span class="identifier">seed</span><span class="special">;</span></pre></td>
</tr>
<tr>
<td>
                    <code class="computeroutput">std::complex&lt;T&gt;</code>
                  </td>
<td>When <code class="computeroutput">T</code> is a built in type and <code class="computeroutput">val.imag() == 0</code>, the result is equal to <code class="computeroutput">hash_value(val.real())</code>. Otherwise an unspecified value, except that equal arguments shall yield the same result.</td>
</tr>
<tr>
<td>
                    <code class="computeroutput">std::type_index</code>
                  </td>
<td><code class="computeroutput">val.hash_code()</code></td>
</tr>
</tbody>
</table></div></td>
</tr>
</tbody>
</table></div>
</li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2005-2008 Daniel
      James<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="rationale.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../hash.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost/hash.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>