Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] unordered flat multimap #279

Open
psiha opened this issue Sep 2, 2024 · 1 comment
Open

[FR] unordered flat multimap #279

psiha opened this issue Sep 2, 2024 · 1 comment

Comments

@psiha
Copy link

psiha commented Sep 2, 2024

If you could also add this container version/combination? 😬

@joaquintides
Copy link
Member

Hi,

Open addressing in general, and the variation used by Boost.Unordered flat containers in particular, do not lend themselves easily to the implementation of multimaps (or multisets). One big problem (there may be more) is that multi(map|set)s, as specified by the standard, need store equivalent elements adjacently, so that, for instance, equal_range(k) can return a pair of iterators comprising the elements equivalent to k (and those alone). Honoring this requirement would force us to relocate non-k elements when a new k-element is inserted --not impossible, but it'd certainly be a rather non-trivial complication.

I haven't ever seen an open-addressing multi(map|set) out there, are you aware of any example we can learn from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants