From 19673e3b1c0b32d09716fff0b265b3dc829ffe8d Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Thu, 6 Jan 2022 15:29:40 -0800 Subject: [PATCH] Update reference docs for `erase()` to include heterogeneous overloads --- doc/ref.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/ref.php b/doc/ref.php index 21b824e3..f34ed038 100644 --- a/doc/ref.php +++ b/doc/ref.php @@ -1116,6 +1116,32 @@ EOL; Only throws an exception if it is thrown by hasher or key_equal. + + + + K&& + + size_type + + The number of elements erased. + + + Only throws an exception if it is thrown by hasher or key_equal. + + + Erase all elements with key equivalent to k. + + This overload only participates in overload resolution if Hash::is_transparent + and Pred::is_transparent are valid member typedefs and neither iterator + nor const_iterator are implicitly convertible from K. 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. + + + const_iterator