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
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter 8. Boost.Functional/Hash</title>
<link rel="stylesheet" href="boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="function/testsuite.html" title="Testsuite">
<link rel="next" href="hash/tutorial.html" title="Tutorial">
</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="function/testsuite.html"><img src="../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="hash/tutorial.html"><img src="../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="chapter" title="Chapter 8. Boost.Functional/Hash">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="hash"></a>Chapter 8. Boost.Functional/Hash</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Daniel</span> <span class="surname">James</span>
</h3></div></div>
<div><p class="copyright">Copyright © 2005-2008 Daniel
James</p></div>
<div><div class="legalnotice" title="Legal Notice">
<a name="id878607"></a><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></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"><a href="hash.html#hash.intro"> Introduction</a></span></dt>
<dt><span class="section"><a href="hash/tutorial.html"> Tutorial</a></span></dt>
<dt><span class="section"><a href="hash/custom.html"> Extending boost::hash for a custom data type</a></span></dt>
<dt><span class="section"><a href="hash/combine.html"> Combining hash values</a></span></dt>
<dt><span class="section"><a href="hash/portability.html"> Portability</a></span></dt>
<dt><span class="section"><a href="hash/disable.html"> Disabling The Extensions</a></span></dt>
<dt><span class="section"><a href="hash/changes.html"> Change Log</a></span></dt>
<dt><span class="section"><a href="hash/reference.html">Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="hash/reference.html#hash.reference.specification"></a></span></dt>
<dt><span class="section"><a href="hash/reference.html#header.boost.functional.hash_hpp">Header <boost/functional/hash.hpp></a></span></dt>
</dl></dd>
<dt><span class="section"><a href="hash/links.html"> Links</a></span></dt>
<dt><span class="section"><a href="hash/acknowledgements.html"> Acknowledgements</a></span></dt>
</dl>
</div>
<p>
</p>
<div class="section" title="Introduction">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="hash.intro"></a><a class="link" href="hash.html#hash.intro" title="Introduction"> Introduction</a>
</h2></div></div></div>
<p>
<code class="computeroutput"><a class="link" href="boost/hash.html" title="Struct template hash">boost::hash</a></code> is an implementation of
the <a href="http://en.wikipedia.org/wiki/Hash_function" target="_top">hash function</a>
object specified by the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Draft
Technical Report on C++ Library Extensions</a> (TR1). It is the default
hash function for <a class="link" href="unordered.html" title="Chapter 26. Boost.Unordered">Boost.Unordered</a>, <a class="link" href="intrusive/unordered_set_unordered_multiset.html" title="Semi-Intrusive unordered associative containers: unordered_set, unordered_multiset">Boost.Intrusive</a>'s
unordered associative containers, and <a href="../../libs/multi_index/doc/index.html" target="_top">Boost.MultiIndex</a>'s
hash indicies and <a href="../../libs/bimap/index.html" target="_top">Boost.Bimap</a>'s
<code class="computeroutput"><span class="identifier">unordered_set_of</span></code>.
</p>
<p>
As it is compliant with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">TR1</a>,
it will work with:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
integers
</li>
<li class="listitem">
floats
</li>
<li class="listitem">
pointers
</li>
<li class="listitem">
strings
</li>
</ul></div>
<p>
It also implements the extension proposed by Peter Dimov in 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), this adds support
for:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
arrays
</li>
<li class="listitem"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></li>
<li class="listitem">
the standard containers.
</li>
<li class="listitem">
extending <code class="computeroutput"><a class="link" href="boost/hash.html" title="Struct template hash">boost::hash</a></code> for custom
types.
</li>
</ul></div>
</div>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: February 01, 2010 at 10:22:29 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="function/testsuite.html"><img src="../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="hash/tutorial.html"><img src="../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
|