forked from boostorg/unordered
Update reference docs for find()
to include heterogeneous overloads
This commit is contained in:
46
doc/ref.php
46
doc/ref.php
@ -1272,6 +1272,24 @@ EOL;
|
|||||||
</parameter>
|
</parameter>
|
||||||
<type>const_iterator</type>
|
<type>const_iterator</type>
|
||||||
</signature>
|
</signature>
|
||||||
|
<signature>
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="K" />
|
||||||
|
</template>
|
||||||
|
<parameter name="k">
|
||||||
|
<paramtype>K const&</paramtype>
|
||||||
|
</parameter>
|
||||||
|
<type>iterator</type>
|
||||||
|
</signature>
|
||||||
|
<signature cv="const">
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="K" />
|
||||||
|
</template>
|
||||||
|
<parameter name="k">
|
||||||
|
<paramtype>K const&</paramtype>
|
||||||
|
</parameter>
|
||||||
|
<type>const_iterator</type>
|
||||||
|
</signature>
|
||||||
<signature>
|
<signature>
|
||||||
<template>
|
<template>
|
||||||
<template-type-parameter name="CompatibleKey"/>
|
<template-type-parameter name="CompatibleKey"/>
|
||||||
@ -1309,13 +1327,27 @@ EOL;
|
|||||||
<returns>
|
<returns>
|
||||||
<para>An iterator pointing to an element with key equivalent to <code>k</code>, or <code>b.end()</code> if no such element exists.</para>
|
<para>An iterator pointing to an element with key equivalent to <code>k</code>, or <code>b.end()</code> if no such element exists.</para>
|
||||||
</returns>
|
</returns>
|
||||||
<notes><para>
|
<notes>
|
||||||
The templated overloads are a non-standard extensions which
|
<para>
|
||||||
allows you to use a compatible hash function and equality
|
The templated overloads containing <code>CompatibleKey</code>,
|
||||||
predicate for a key of a different type in order to avoid
|
<code>CompatibleHash</code> and <code>CompatiblePredicate</code>
|
||||||
an expensive type cast. In general, its use is not encouraged.
|
are non-standard extensions which allow you to use a compatible
|
||||||
</para></notes>
|
hash function and equality predicate for a key of a different type
|
||||||
</overloaded-method>
|
in order to avoid an expensive type cast. In general, its use is
|
||||||
|
not encouraged and instead the <code>K</code> member function
|
||||||
|
templates should be used.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The <code>template <typename K></code> overloads only participate
|
||||||
|
in overload resolution if <code>Hash::is_transparent</code> and
|
||||||
|
<code>Pred::is_transparent</code> are valid member typedefs. The
|
||||||
|
library assumes that <code>Hash</code> is callable with both
|
||||||
|
<code>K</code> and <code>Key</code> and that <code>Pred</code> is
|
||||||
|
transparent. This enables heterogeneous lookup which avoids the cost of
|
||||||
|
instantiating an instance of the <code>Key</code> type.
|
||||||
|
</para>
|
||||||
|
</notes>
|
||||||
|
</overloaded-method>
|
||||||
<method name="count" cv="const">
|
<method name="count" cv="const">
|
||||||
<parameter name="k">
|
<parameter name="k">
|
||||||
<paramtype>key_type const&</paramtype>
|
<paramtype>key_type const&</paramtype>
|
||||||
|
Reference in New Issue
Block a user