mirror of
https://github.com/boostorg/functional.git
synced 2025-08-02 22:14:28 +02:00
Put the reference documentation overloads of 'hash_value' into a single page.
[SVN r33508]
This commit is contained in:
368
hash/doc/ref.xml
368
hash/doc/ref.xml
@@ -68,7 +68,7 @@
|
|||||||
</parameter>
|
</parameter>
|
||||||
<returns>
|
<returns>
|
||||||
<para>Unspecified in TR1, except that equal arguments yield the same result.</para>
|
<para>Unspecified in TR1, except that equal arguments yield the same result.</para>
|
||||||
<para><functionname alt="boost::hash_value(bool)">hash_value</functionname>(val) in Boost.</para>
|
<para><functionname>hash_value</functionname>(val) in Boost.</para>
|
||||||
</returns>
|
</returns>
|
||||||
<throws><para>Doesn't throw</para></throws>
|
<throws><para>Doesn't throw</para></throws>
|
||||||
</method>
|
</method>
|
||||||
@@ -266,7 +266,7 @@
|
|||||||
</parameter>
|
</parameter>
|
||||||
<returns>
|
<returns>
|
||||||
<para>Unspecified in TR1, except that equal arguments yield the same result.</para>
|
<para>Unspecified in TR1, except that equal arguments yield the same result.</para>
|
||||||
<para><functionname alt="boost::hash_value(float)">hash_value</functionname>(val) in Boost.</para>
|
<para><functionname>hash_value</functionname>(val) in Boost.</para>
|
||||||
</returns>
|
</returns>
|
||||||
<throws><para>Doesn't throw</para></throws>
|
<throws><para>Doesn't throw</para></throws>
|
||||||
</method>
|
</method>
|
||||||
@@ -354,7 +354,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<type>void</type>
|
<type>void</type>
|
||||||
<parameter name="seed"><paramtype>size_t &</paramtype></parameter>
|
<parameter name="seed"><paramtype>size_t &</paramtype></parameter>
|
||||||
<parameter name="v"><paramtype>T const &</paramtype></parameter>
|
<parameter name="v"><paramtype>T const&</paramtype></parameter>
|
||||||
<purpose>
|
<purpose>
|
||||||
Called repeatedly to incrementally create a hash value from
|
Called repeatedly to incrementally create a hash value from
|
||||||
several variables.
|
several variables.
|
||||||
@@ -444,21 +444,9 @@ for(; first != last; ++first)
|
|||||||
|
|
||||||
<overloaded-function name="hash_value">
|
<overloaded-function name="hash_value">
|
||||||
<purpose>
|
<purpose>
|
||||||
Implementation of a hash function for integers.
|
Implementation of the hash function.
|
||||||
</purpose>
|
</purpose>
|
||||||
|
|
||||||
<description><para>
|
|
||||||
Generally shouldn't be called directly by users, instead they should use
|
|
||||||
<classname>boost::hash</classname>, <functionname>boost::hash_range</functionname>
|
|
||||||
or <functionname>boost::hash_combine</functionname> which
|
|
||||||
call hash_value without namespace qualification so that overloads
|
|
||||||
for custom types are found via ADL.
|
|
||||||
</para></description>
|
|
||||||
<notes>
|
|
||||||
<para>Overloads for other types supplied in other headers.</para>
|
|
||||||
<para>This is an extension to TR1</para>
|
|
||||||
</notes>
|
|
||||||
|
|
||||||
<signature>
|
<signature>
|
||||||
<type>std::size_t</type>
|
<type>std::size_t</type>
|
||||||
<parameter name="val"><paramtype>int</paramtype></parameter>
|
<parameter name="val"><paramtype>int</paramtype></parameter>
|
||||||
@@ -479,32 +467,6 @@ for(; first != last; ++first)
|
|||||||
<parameter name="val"><paramtype>unsigned long</paramtype></parameter>
|
<parameter name="val"><paramtype>unsigned long</paramtype></parameter>
|
||||||
</signature>
|
</signature>
|
||||||
|
|
||||||
<returns>
|
|
||||||
<code>val</code>
|
|
||||||
</returns>
|
|
||||||
</overloaded-function>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
boost::hash_value - floating point
|
|
||||||
-->
|
|
||||||
|
|
||||||
<overloaded-function name="hash_value">
|
|
||||||
<purpose>
|
|
||||||
Implementation of a hash function for floating point values.
|
|
||||||
</purpose>
|
|
||||||
|
|
||||||
<description><para>
|
|
||||||
Generally shouldn't be called directly by users, instead they should use
|
|
||||||
<classname>boost::hash</classname>, <functionname>boost::hash_range</functionname>
|
|
||||||
or <functionname>boost::hash_combine</functionname> which
|
|
||||||
call hash_value without namespace qualification so that overloads
|
|
||||||
for custom types are found via ADL.
|
|
||||||
</para></description>
|
|
||||||
<notes>
|
|
||||||
<para>Overloads for other types supplied in other headers.</para>
|
|
||||||
<para>This is an extension to TR1</para>
|
|
||||||
</notes>
|
|
||||||
|
|
||||||
<signature>
|
<signature>
|
||||||
<type>std::size_t</type>
|
<type>std::size_t</type>
|
||||||
<parameter name="val"><paramtype>float</paramtype></parameter>
|
<parameter name="val"><paramtype>float</paramtype></parameter>
|
||||||
@@ -520,70 +482,12 @@ for(; first != last; ++first)
|
|||||||
<parameter name="val"><paramtype>long double</paramtype></parameter>
|
<parameter name="val"><paramtype>long double</paramtype></parameter>
|
||||||
</signature>
|
</signature>
|
||||||
|
|
||||||
<returns>
|
|
||||||
<para>
|
|
||||||
An unspecified value, except that equal arguments shall yield the same
|
|
||||||
result
|
|
||||||
</para>
|
|
||||||
</returns>
|
|
||||||
</overloaded-function>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
boost::hash_value - pointers
|
|
||||||
-->
|
|
||||||
|
|
||||||
<overloaded-function name="hash_value">
|
|
||||||
<purpose>
|
|
||||||
Implementation of a hash function for pointers.
|
|
||||||
</purpose>
|
|
||||||
|
|
||||||
<description><para>
|
|
||||||
Generally shouldn't be called directly by users, instead they should use
|
|
||||||
<classname>boost::hash</classname>, <functionname>boost::hash_range</functionname>
|
|
||||||
or <functionname>boost::hash_combine</functionname> which
|
|
||||||
call hash_value without namespace qualification so that overloads
|
|
||||||
for custom types are found via ADL.
|
|
||||||
</para></description>
|
|
||||||
<notes>
|
|
||||||
<para>Overloads for other types supplied in other headers.</para>
|
|
||||||
<para>This is an extension to TR1</para>
|
|
||||||
</notes>
|
|
||||||
|
|
||||||
<signature>
|
<signature>
|
||||||
<template><template-type-parameter name="T"/></template>
|
<template><template-type-parameter name="T"/></template>
|
||||||
<type>std::size_t</type>
|
<type>std::size_t</type>
|
||||||
<parameter name="val"><paramtype>T* const&</paramtype></parameter>
|
<parameter name="val"><paramtype>T* const&</paramtype></parameter>
|
||||||
</signature>
|
</signature>
|
||||||
|
|
||||||
<returns>
|
|
||||||
<para>
|
|
||||||
An unspecified value, except that equal arguments shall yield the same
|
|
||||||
result
|
|
||||||
</para>
|
|
||||||
</returns>
|
|
||||||
</overloaded-function>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
boost::hash_value - arrays
|
|
||||||
-->
|
|
||||||
|
|
||||||
<overloaded-function name="hash_value">
|
|
||||||
<purpose>
|
|
||||||
Implementation of a hash function for built in arrays.
|
|
||||||
</purpose>
|
|
||||||
|
|
||||||
<description><para>
|
|
||||||
Generally shouldn't be called directly by users, instead they should use
|
|
||||||
<classname>boost::hash</classname>, <functionname>boost::hash_range</functionname>
|
|
||||||
or <functionname>boost::hash_combine</functionname> which
|
|
||||||
call hash_value without namespace qualification so that overloads
|
|
||||||
for custom types are found via ADL.
|
|
||||||
</para></description>
|
|
||||||
<notes>
|
|
||||||
<para>Overloads for other types supplied in other headers.</para>
|
|
||||||
<para>This is an extension to TR1</para>
|
|
||||||
</notes>
|
|
||||||
|
|
||||||
<signature>
|
<signature>
|
||||||
<template>
|
<template>
|
||||||
<template-type-parameter name="T"/>
|
<template-type-parameter name="T"/>
|
||||||
@@ -602,30 +506,6 @@ for(; first != last; ++first)
|
|||||||
<parameter><paramtype>const T (&val)[N]</paramtype></parameter>
|
<parameter><paramtype>const T (&val)[N]</paramtype></parameter>
|
||||||
</signature>
|
</signature>
|
||||||
|
|
||||||
<returns><code>hash_range(val, val+N)</code></returns>
|
|
||||||
</overloaded-function>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
boost::hash_value - string
|
|
||||||
-->
|
|
||||||
|
|
||||||
<overloaded-function name="hash_value">
|
|
||||||
<purpose>
|
|
||||||
Implementation of a hash function for <code>std::basic_string</code>.
|
|
||||||
</purpose>
|
|
||||||
|
|
||||||
<description><para>
|
|
||||||
Generally shouldn't be called directly by users, instead they should use
|
|
||||||
<classname>boost::hash</classname>, <functionname>boost::hash_range</functionname>
|
|
||||||
or <functionname>boost::hash_combine</functionname> which
|
|
||||||
call hash_value without namespace qualification so that overloads
|
|
||||||
for custom types are found via ADL.
|
|
||||||
</para></description>
|
|
||||||
<notes>
|
|
||||||
<para>Overloads for other types supplied in other headers.</para>
|
|
||||||
<para>This is an extension to TR1</para>
|
|
||||||
</notes>
|
|
||||||
|
|
||||||
<signature>
|
<signature>
|
||||||
<template>
|
<template>
|
||||||
<template-type-parameter name="Ch"/>
|
<template-type-parameter name="Ch"/>
|
||||||
@@ -636,118 +516,156 @@ for(; first != last; ++first)
|
|||||||
<paramtype>std::basic_string<Ch, std::char_traits<Ch>, A> const&</paramtype>
|
<paramtype>std::basic_string<Ch, std::char_traits<Ch>, A> const&</paramtype>
|
||||||
</parameter>
|
</parameter>
|
||||||
</signature>
|
</signature>
|
||||||
|
|
||||||
<returns><code>hash_range(val.begin(), val.end())</code></returns>
|
<signature>
|
||||||
</overloaded-function>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
boost::hash_value - pairs
|
|
||||||
-->
|
|
||||||
|
|
||||||
<overloaded-function name="hash_value">
|
|
||||||
<signature>
|
|
||||||
<template>
|
<template>
|
||||||
<template-type-parameter name="A"/>
|
<template-type-parameter name="A"/>
|
||||||
<template-type-parameter name="B"/>
|
<template-type-parameter name="B"/>
|
||||||
</template>
|
</template>
|
||||||
<type>std::size_t</type>
|
<type>std::size_t</type>
|
||||||
<parameter name="val"><paramtype>std::pair<A, B> const &</paramtype></parameter>
|
<parameter name="val"><paramtype>std::pair<A, B> const&</paramtype></parameter>
|
||||||
</signature>
|
</signature>
|
||||||
<effects><programlisting>
|
|
||||||
size_t seed = 0;
|
<signature>
|
||||||
<functionname>hash_combine</functionname>(seed, val.first);
|
<template>
|
||||||
<functionname>hash_combine</functionname>(seed, val.second);
|
<template-type-parameter name="T"/>
|
||||||
return seed;
|
<template-type-parameter name="A"/>
|
||||||
</programlisting></effects>
|
</template>
|
||||||
|
<type>std::size_t</type>
|
||||||
|
<parameter name="val"><paramtype>std::vector<T, A> const&</paramtype></parameter>
|
||||||
|
</signature>
|
||||||
|
|
||||||
|
<signature>
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="T"/>
|
||||||
|
<template-type-parameter name="A"/>
|
||||||
|
</template>
|
||||||
|
<type>std::size_t</type>
|
||||||
|
<parameter name="val"><paramtype>std::list<T, A> const&</paramtype></parameter>
|
||||||
|
</signature>
|
||||||
|
|
||||||
|
<signature>
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="T"/>
|
||||||
|
<template-type-parameter name="A"/>
|
||||||
|
</template>
|
||||||
|
<type>std::size_t</type>
|
||||||
|
<parameter name="val"><paramtype>std::deque<T, A> const&</paramtype></parameter>
|
||||||
|
</signature>
|
||||||
|
|
||||||
|
<signature>
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="K"/>
|
||||||
|
<template-type-parameter name="C"/>
|
||||||
|
<template-type-parameter name="A"/>
|
||||||
|
</template>
|
||||||
|
<type>std::size_t</type>
|
||||||
|
<parameter name="val"><paramtype>std::set<K, C, A> const&</paramtype></parameter>
|
||||||
|
</signature>
|
||||||
|
|
||||||
|
<signature>
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="K"/>
|
||||||
|
<template-type-parameter name="C"/>
|
||||||
|
<template-type-parameter name="A"/>
|
||||||
|
</template>
|
||||||
|
<type>std::size_t</type>
|
||||||
|
<parameter name="val"><paramtype>std::multiset<K, C, A> const&</paramtype></parameter>
|
||||||
|
</signature>
|
||||||
|
|
||||||
|
<signature>
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="K"/>
|
||||||
|
<template-type-parameter name="T"/>
|
||||||
|
<template-type-parameter name="C"/>
|
||||||
|
<template-type-parameter name="A"/>
|
||||||
|
</template>
|
||||||
|
<type>std::size_t</type>
|
||||||
|
<parameter name="val"><paramtype>std::map<K, T, C, A> const&</paramtype></parameter>
|
||||||
|
</signature>
|
||||||
|
|
||||||
|
<signature>
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="K"/>
|
||||||
|
<template-type-parameter name="T"/>
|
||||||
|
<template-type-parameter name="C"/>
|
||||||
|
<template-type-parameter name="A"/>
|
||||||
|
</template>
|
||||||
|
<type>std::size_t</type>
|
||||||
|
<parameter name="val"><paramtype>std::multimap<K, T, C, A> const&</paramtype></parameter>
|
||||||
|
</signature>
|
||||||
|
|
||||||
|
<description><para>
|
||||||
|
Generally shouldn't be called directly by users, instead they should use
|
||||||
|
<classname>boost::hash</classname>, <functionname>boost::hash_range</functionname>
|
||||||
|
or <functionname>boost::hash_combine</functionname> which
|
||||||
|
call <code>hash_value</code> without namespace qualification so that overloads
|
||||||
|
for custom types are found via ADL.
|
||||||
|
</para></description>
|
||||||
|
|
||||||
|
<notes>
|
||||||
|
<para>This is an extension to TR1</para>
|
||||||
|
</notes>
|
||||||
|
|
||||||
<throws>
|
<throws>
|
||||||
Only throws if <code><functionname>hash_value</functionname>(A)</code>
|
Only throws if a user supplied version of
|
||||||
or <code><functionname>hash_value</functionname>(B)</code> throws.
|
<code><functionname>hash_value</functionname></code>
|
||||||
|
throws for an element of a container, or
|
||||||
|
one of the types stored in a pair.
|
||||||
</throws>
|
</throws>
|
||||||
<notes><para>This is an extension to TR1</para></notes>
|
|
||||||
</overloaded-function>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
boost::hash_value - containers
|
|
||||||
-->
|
|
||||||
|
|
||||||
<overloaded-function name="hash_value">
|
|
||||||
<signature>
|
|
||||||
<template>
|
|
||||||
<template-type-parameter name="T"/>
|
|
||||||
<template-type-parameter name="A"/>
|
|
||||||
</template>
|
|
||||||
<type>std::size_t</type>
|
|
||||||
<parameter name="val"><paramtype>std::vector<T, A> const &</paramtype></parameter>
|
|
||||||
</signature>
|
|
||||||
|
|
||||||
<signature>
|
|
||||||
<template>
|
|
||||||
<template-type-parameter name="T"/>
|
|
||||||
<template-type-parameter name="A"/>
|
|
||||||
</template>
|
|
||||||
<type>std::size_t</type>
|
|
||||||
<parameter name="val"><paramtype>std::list<T, A> const &</paramtype></parameter>
|
|
||||||
</signature>
|
|
||||||
|
|
||||||
<signature>
|
|
||||||
<template>
|
|
||||||
<template-type-parameter name="T"/>
|
|
||||||
<template-type-parameter name="A"/>
|
|
||||||
</template>
|
|
||||||
<type>std::size_t</type>
|
|
||||||
<parameter name="val"><paramtype>std::deque<T, A> const &</paramtype></parameter>
|
|
||||||
</signature>
|
|
||||||
|
|
||||||
<signature>
|
|
||||||
<template>
|
|
||||||
<template-type-parameter name="K"/>
|
|
||||||
<template-type-parameter name="C"/>
|
|
||||||
<template-type-parameter name="A"/>
|
|
||||||
</template>
|
|
||||||
<type>std::size_t</type>
|
|
||||||
<parameter name="val"><paramtype>std::set<K, C, A> const &</paramtype></parameter>
|
|
||||||
</signature>
|
|
||||||
|
|
||||||
<signature>
|
|
||||||
<template>
|
|
||||||
<template-type-parameter name="K"/>
|
|
||||||
<template-type-parameter name="C"/>
|
|
||||||
<template-type-parameter name="A"/>
|
|
||||||
</template>
|
|
||||||
<type>std::size_t</type>
|
|
||||||
<parameter name="val"><paramtype>std::multiset<K, C, A> const &</paramtype></parameter>
|
|
||||||
</signature>
|
|
||||||
|
|
||||||
<signature>
|
|
||||||
<template>
|
|
||||||
<template-type-parameter name="K"/>
|
|
||||||
<template-type-parameter name="T"/>
|
|
||||||
<template-type-parameter name="C"/>
|
|
||||||
<template-type-parameter name="A"/>
|
|
||||||
</template>
|
|
||||||
<type>std::size_t</type>
|
|
||||||
<parameter name="val"><paramtype>std::map<K, T, C, A> const &</paramtype></parameter>
|
|
||||||
</signature>
|
|
||||||
|
|
||||||
<signature>
|
|
||||||
<template>
|
|
||||||
<template-type-parameter name="K"/>
|
|
||||||
<template-type-parameter name="T"/>
|
|
||||||
<template-type-parameter name="C"/>
|
|
||||||
<template-type-parameter name="A"/>
|
|
||||||
</template>
|
|
||||||
<type>std::size_t</type>
|
|
||||||
<parameter name="val"><paramtype>std::multimap<K, T, C, A> const &</paramtype></parameter>
|
|
||||||
</signature>
|
|
||||||
|
|
||||||
<returns>
|
<returns>
|
||||||
<code><functionname>hash_range</functionname>(val.begin(), val.end());</code>
|
<informaltable>
|
||||||
|
<tgroup cols="2">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry>Types</entry>
|
||||||
|
<entry>Returns</entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry><code>int</code></entry>
|
||||||
|
<entry morerows="3"><code>val</code></entry>
|
||||||
|
</row>
|
||||||
|
<row><entry><code>unsigned int</code></entry></row>
|
||||||
|
<row><entry><code>long</code></entry></row>
|
||||||
|
<row><entry><code>unsigned long</code></entry></row>
|
||||||
|
<row>
|
||||||
|
<entry><code>float</code></entry>
|
||||||
|
<entry morerows="3">An unspecified value, except that equal arguments shall yield the same result.</entry>
|
||||||
|
</row>
|
||||||
|
<row><entry><code>double</code></entry></row>
|
||||||
|
<row><entry><code>long double</code></entry></row>
|
||||||
|
<row><entry><code>T*</code></entry></row>
|
||||||
|
<row>
|
||||||
|
<entry><code>T (&val)[N]</code></entry>
|
||||||
|
<entry morerows="1"><code>hash_range(val, val+N)</code></entry>
|
||||||
|
</row>
|
||||||
|
<row><entry><code>const T (&val)[N]</code></entry></row>
|
||||||
|
<row>
|
||||||
|
<entry><code>std:basic<Ch, std::char_traits<Ch>, A> const&</code></entry>
|
||||||
|
<entry morerows="7"><code>hash_range(val, val+N)</code></entry>
|
||||||
|
</row>
|
||||||
|
<row><entry><code>std::vector<T, A> const&</code></entry></row>
|
||||||
|
<row><entry><code>std::list<T, A> const&</code></entry></row>
|
||||||
|
<row><entry><code>std::deque<T, A> const&</code></entry></row>
|
||||||
|
<row><entry><code>std::set<K, C, A> const&</code></entry></row>
|
||||||
|
<row><entry><code>std::multiset<K, C, A> const&</code></entry></row>
|
||||||
|
<row><entry><code>std::map<K, T, C, A> const&</code></entry></row>
|
||||||
|
<row><entry><code>std::multimap<K, T, C, A> const&</code></entry></row>
|
||||||
|
<row>
|
||||||
|
<entry><code>std::pair<A, B> const&</code></entry>
|
||||||
|
<entry><programlisting>size_t seed = 0;
|
||||||
|
<functionname>hash_combine</functionname>(seed, val.first);
|
||||||
|
<functionname>hash_combine</functionname>(seed, val.second);
|
||||||
|
return seed;</programlisting></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</informaltable>
|
||||||
</returns>
|
</returns>
|
||||||
<throws>
|
</overloaded-function>
|
||||||
Only throws if <code><functionname>hash_value</functionname>(T)</code> throws.
|
|
||||||
</throws>
|
|
||||||
<notes><para>This is an extension to TR1</para></notes>
|
|
||||||
</overloaded-function>
|
|
||||||
</namespace>
|
</namespace>
|
||||||
</header>
|
</header>
|
||||||
</library-reference>
|
</library-reference>
|
||||||
|
Reference in New Issue
Block a user