#include #include #include #include #include template struct MaybeUninit; using Str = const char*; template struct HashTable { uintptr_t num_buckets; uintptr_t capacity; uint8_t *occupied; MaybeUninit *keys; MaybeUninit *vals; }; using MySet = HashTable; using SetCallback = void(*)(Str key); using MapCallback = void(*)(Str key, uint64_t val); extern "C" { MySet *new_set(); void set_for_each(const MySet *set, SetCallback callback); HashTable *new_map(); void map_for_each(const HashTable *map, MapCallback callback); } // extern "C"