Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSet-based operations on HashMap #1893
Comments
jethrogb
changed the title
View HashMap keys as HashSet
Enable set-based operations on HashMap
Feb 9, 2017
jethrogb
changed the title
Enable set-based operations on HashMap
Set-based operations on HashMap
Feb 9, 2017
This comment has been minimized.
This comment has been minimized.
|
How about:
or possibly:
It might not be that trivial implementation-wise because ... |
frewsxcv
added
the
A-libs
label
Feb 13, 2017
This comment has been minimized.
This comment has been minimized.
|
I've been thinking about this some more, and I think it would be useful to have the all set operations supported on enum Occurence<V1,V2> {
InSelf(&V1),
InOther(&V2),
InBoth(&V1, &V2),
} |
petrochenkov
added
T-libs
and removed
A-libs
labels
Jan 28, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jethrogb commentedFeb 9, 2017
•
edited
HashSethas all kinds of useful set functionality, but these functions are incompatible withHashMapkeys:It would be nice to enable the use of these functions between
HashMaps andHashSets, either by allowing semi-cheap conversions fromHashMap.keystoHashSetor by enabling those functions to take either maps or sets.