diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 3b6093fe..cb23d148 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -739,9 +739,10 @@ class HashtableInlineDataImpl { static_assert( sizeof(HashtableInlineDataImpl::HashtableCapacity) == sizeof(size_t)); -static_assert(sizeof(HashtableInlineDataImpl) == - // NOTE: some platforms have uint64_t alignment equal to 4. - sizeof(std::pair)); +// NOTE: some platforms have this size to be equal to 12 for two reasons: +// 1) uint64_t alignment equal to 4. +// 2) struct with two uint64_t bitfields has size 12, but alignment 8. +static_assert(sizeof(HashtableInlineDataImpl) <= 16); static_assert( sizeof(HashtableInlineDataImpl::HashtableCapacity) == 1); static_assert(sizeof(HashtableInlineDataImpl) == 8);