From a0299fa26c3780ee19867fb08fc9f35897034542 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 5 Jul 2023 08:37:20 -0700 Subject: Clarify that lazy_emplace returns an iterator to the new element when lookup fails. PiperOrigin-RevId: 545683736 Change-Id: Ic0abec5037e160898e2f24de1b1489caff7d06fd --- absl/container/internal/raw_hash_set.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 970016f7..c2fe242d 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -2041,7 +2041,8 @@ class raw_hash_set { // Extension API: support for lazy emplace. // // Looks up key in the table. If found, returns the iterator to the element. - // Otherwise calls `f` with one argument of type `raw_hash_set::constructor`. + // Otherwise calls `f` with one argument of type `raw_hash_set::constructor`, + // and returns an iterator to the new element. // // `f` must abide by several restrictions: // - it MUST call `raw_hash_set::constructor` with arguments as if a -- cgit v1.2.3