{"id":50769219,"url":"https://github.com/miaan15/slot-map","last_synced_at":"2026-06-11T16:38:49.611Z","repository":{"id":342014870,"uuid":"1172414406","full_name":"miaan15/slot-map","owner":"miaan15","description":"Slot Map Implementation - C++17 header-only","archived":false,"fork":false,"pushed_at":"2026-03-04T10:28:24.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T16:38:48.381Z","etag":null,"topics":["cpp","data-structures","header-only","slot-map"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miaan15.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-04T09:30:13.000Z","updated_at":"2026-03-04T10:30:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/miaan15/slot-map","commit_stats":null,"previous_names":["miaan15/slot-map"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/miaan15/slot-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaan15%2Fslot-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaan15%2Fslot-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaan15%2Fslot-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaan15%2Fslot-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miaan15","download_url":"https://codeload.github.com/miaan15/slot-map/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaan15%2Fslot-map/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34208762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","data-structures","header-only","slot-map"],"created_at":"2026-06-11T16:38:48.867Z","updated_at":"2026-06-11T16:38:49.606Z","avatar_url":"https://github.com/miaan15.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slot Map\n\nA header-only C++17 implementation of the **slot map** data structure.\n\nWidely used in ECS\n\n## Features\n\n- O(1) insertion, deletion, and lookup\n- Stable key handles that remain valid across insertions and deletions by generational safety\n- Contiguous data storage for cache-friendly iteration\n- Standard convention implementation\n\n## Building\n\n```bash\ncmake -B build\ncmake --build build\n```\n\n## Running Tests\n\n```bash\nctest --test-dir build\n# or\n./build/slot_map_test\n```\n\n## Usage\n\n```cpp\n#include \"slot_map.cpp\"\n\nslot_map\u003cint\u003e sm;\n\n// Insert elements\nauto k1 = sm.insert(42);\nauto k2 = sm.emplace(100);\n\n// Access by key\nint value = sm[k1];        // 42\nsm[k2] = 200;\n\n// Check if key is valid\nif (sm.contains(k1)) {\n    // ...\n}\n\n// Find element\nauto it = sm.find(k1);\nif (it != sm.end()) {\n    // *it == 42\n}\n\n// Erase by key or iterator\nsm.erase(k1);\n\n// Iterate over all elements (contiguous storage)\nfor (auto \u0026val : sm) {\n    // ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiaan15%2Fslot-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiaan15%2Fslot-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiaan15%2Fslot-map/lists"}