Support std::multimap and std::unordered_multimap#15
Merged
jonatanklosko merged 4 commits intoelixir-nx:mainfrom Aug 19, 2025
Merged
Support std::multimap and std::unordered_multimap#15jonatanklosko merged 4 commits intoelixir-nx:mainfrom
std::multimap and std::unordered_multimap#15jonatanklosko merged 4 commits intoelixir-nx:mainfrom
Conversation
This commit enables support for `std::multimap` and `std::unordered_multimap` using `fine::decode` and `fine::encoder`.
f3d3339 to
b2d1416
Compare
Member
jonatanklosko
left a comment
There was a problem hiding this comment.
Tiny comments and looks good to me!
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.
This commit enables support for
std::multimapandstd::unordered_multimapusingfine::decodeandfine::encoder.This can allow users to handle keyword lists more easily:
Unlike
std::map,std::multimapdoes not have anoperator[], meaning that accessing keys that do not exist will not default initialize its value on access. User must usestd::multimap::findand deal with the absence of key.If accumulating values for the same key is required,
std::multimap::range_equal, andstd::multimap::lower_boundandstd::multimap::upper_boundcan be used in conjunction with<ranges>(C++20) or<algorithm>(C++17):