From c44dd5acd7848a175d1fb939cdb81a4cf8d4c912 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 30 Jan 2024 12:52:43 -0800 Subject: Early return from destroy_slots for trivially destructible types in flat_hash_{*}. PiperOrigin-RevId: 602813933 Change-Id: I744fe438281755a141b2fd47e54ab9c6c0fad5a3 --- absl/container/internal/raw_hash_set.h | 1 + 1 file changed, 1 insertion(+) (limited to 'absl/container/internal/raw_hash_set.h') diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index ba7df607..9f16a815 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -2881,6 +2881,7 @@ class raw_hash_set { } inline void destroy_slots() { + if (PolicyTraits::template destroy_is_trivial()) return; const size_t cap = capacity(); const ctrl_t* ctrl = control(); slot_type* slot = slot_array(); -- cgit v1.2.3