Skip to content

Commit

Permalink
Add assertion to make sure that static_empty_bucket_ptr is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Tessil committed Jun 13, 2022
1 parent ac1e3d8 commit f8e0f67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/tsl/robin_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,7 @@ class robin_hash : private Hash, private KeyEqual, private GrowthPolicy {
*/
bucket_entry* static_empty_bucket_ptr() noexcept {
static bucket_entry empty_bucket(true);
tsl_rh_assert(empty_bucket.empty());
return &empty_bucket;
}

Expand Down

0 comments on commit f8e0f67

Please sign in to comment.