Fix a bug of casting sizeof(slot_type) to uint16_t instead of uint32_t. Note that in the above static_assert, we check that sizeof(slot_type) fits in a uint32_t, not a uint16_t and the field in PolicyFunctions is a uint32_t. PiperOrigin-RevId: 756886567 Change-Id: I5ca915b814d1da6cdc1d24152b2ebde5dec9d28b
diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 3bc86d1..3effc44 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h
@@ -3607,7 +3607,7 @@ static constexpr PolicyFunctions value = { static_cast<uint32_t>(sizeof(key_type)), static_cast<uint32_t>(sizeof(value_type)), - static_cast<uint16_t>(sizeof(slot_type)), + static_cast<uint32_t>(sizeof(slot_type)), static_cast<uint16_t>(alignof(slot_type)), SooEnabled(), ShouldSampleHashtablezInfoForAlloc<CharAlloc>(), // TODO(b/328722020): try to type erase