Skip to content

MapTombstones

Description

Tombstone count: slots that previously held a key but are now reserved for probe-chain continuity. Reset to zero by rehash.

Parameters

Name Direction Description
m in Map.

Usage example (Cross-references)

Usage examples (Cross-references)
        MapClear(&map);
    
        bool result = (reserved_capacity >= 32) && (MapCapacity(&map) == reserved_capacity) && (MapTombstones(&map) == 0) &&
                      (MapPairCount(&map) == 0) && MapEmpty(&map) && !MapContainsKey(&map, 1) && !MapContainsKey(&map, 2);
        MapInsertR(&second, 10, 100);
    
        bool result = (MapTombstones(&first) == 1);
        MapCompact(&first);
        MapCompact(&first);
    
        result = result && (MapTombstones(&first) == 0);
        result = result && MapContainsPair(&first, 1, 11);
        result = result && MapContainsPair(&first, 2, 20);
    
        bool result =
            MapPairCount(&map) == 0 && MapCapacity(&map) == 0 && MapTombstones(&map) == 0 && MapEntries(&map) == NULL &&
            MapStates(&map) == NULL && map.key_compare == i32_compare && map.value_compare == NULL &&
            map.key_hash == i32_hash && map.policy.should_rehash == MapPolicyLinear.should_rehash &&
Last updated on