| ... | ... | @@ -370,12 +370,15 @@ pub fn HashMap( |
| 370 | 370 | comptime Context: type, |
| 371 | 371 | comptime max_load_percentage: u64, |
| 372 | 372 | ) type { |
| 373 | | comptime verifyContext(Context, K, K, u64, false); |
| 374 | 373 | return struct { |
| 375 | 374 | unmanaged: Unmanaged, |
| 376 | 375 | allocator: Allocator, |
| 377 | 376 | ctx: Context, |
| 378 | 377 | |
| 378 | comptime { |
| 379 | verifyContext(Context, K, K, u64, false); |
| 380 | } |
| 381 | |
| 379 | 382 | /// The type of the unmanaged hash map underlying this wrapper |
| 380 | 383 | pub const Unmanaged = HashMapUnmanaged(K, V, Context, max_load_percentage); |
| 381 | 384 | /// An entry, containing pointers to a key and value stored in the map |
| ... | ... | @@ -694,11 +697,13 @@ pub fn HashMapUnmanaged( |
| 694 | 697 | ) type { |
| 695 | 698 | if (max_load_percentage <= 0 or max_load_percentage >= 100) |
| 696 | 699 | @compileError("max_load_percentage must be between 0 and 100."); |
| 697 | | comptime verifyContext(Context, K, K, u64, false); |
| 698 | | |
| 699 | 700 | return struct { |
| 700 | 701 | const Self = @This(); |
| 701 | 702 | |
| 703 | comptime { |
| 704 | verifyContext(Context, K, K, u64, false); |
| 705 | } |
| 706 | |
| 702 | 707 | // This is actually a midway pointer to the single buffer containing |
| 703 | 708 | // a `Header` field, the `Metadata`s and `Entry`s. |
| 704 | 709 | // At `-@sizeOf(Header)` is the Header field. |