Repository navigation
feat(data): gtl flat_hash_map and flat_hash_set instead of std::unordered_map - #19
Merged
Merged
Conversation
codethinki
enabled auto-merge (squash)
October 21, 2026 09:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on codethinki/cth_cmake#8.
lib/cth_cmakepoints at the commit of that PR branch; after #8 is merged it has to move to the merged commit before this PR is merged.cthcomponent:gtlinvcpkg.json, andcth/cmake/Findgtl.cmake(gtl installs only its headers and no CMake package), registered withcth_pkg_add_find_modulesand found withcth_pkg_target_find_package(cth gtl MODULE REQUIRED). The installed package ships the module, so consumers of the installed cth need nothing but gtl.cth/data/hash_map.hpp:cth::dt::flat_hash_mapandcth::dt::flat_hash_set, aliases of the gtl types (no pointer stability)data/pool.hpp,data/thread_pool.hpp, the thread pool test andcth_netwebsocket server: the flat gtl typesdata/union_find.hppall(): astd::vectorindexed by the root, the roots are indices andall()stays constexpralgorithm/combine.hpp: the node map becomes aflat_hash_map; the element pool staysstd::unordered_set, it keeps pointers to its elements and needs the pointer stabilityTested: gcc_debug build without errors or warnings, all 272 tests pass. The installed package works from a consumer with
find_package(cth CONFIG REQUIRED COMPONENTS cth)and the real gtl. cth_engine builds against this branch (with cth_cmake#8) and its 318 tests pass.