From 49b630c2d4e64b4914ffcc67f172f519221f21cc Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Thu, 6 Jan 2022 15:28:07 -0800 Subject: [PATCH] Update reference docs for `count()` to include heterogeneous overloads --- doc/ref.php | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/doc/ref.php b/doc/ref.php index b3a69d75..d97da8a4 100644 --- a/doc/ref.php +++ b/doc/ref.php @@ -1348,15 +1348,37 @@ EOL; - - - key_type const& - - size_type + + + + key_type const& + + size_type + + + + + K const& + + size_type + The number of elements with key equivalent to k. - + + + The template <typename K> overload only participates + in overload resolution if Hash::is_transparent and + Pred::is_transparent are valid member typedefs. The + library assumes that Hash is callable with both + K and Key and that Pred is + transparent. This enables heterogeneous lookup which avoids the cost of + instantiating an instance of the Key type. + + +