Skip to content

Conversation

peddie
Copy link
Contributor

@peddie peddie commented Oct 15, 2025

Previously map utilities were constrained to support only map types with two template parameters (key and value), preventing use of map_contains() and friends with things like std::map with a custom comparator.

This commit generalises the template signatures of the map utilities to support such maps and adds SFINAE detection for find() with any arbitrary key type where appropriate, thereby supporting transparent heterogeneous access in map_contains() and map_at_or().

Previously map utilities were constrained to support only map types
with two template parameters (key and value), preventing use of
`map_contains()` and friends with things like `std::map` with a custom
comparator.

This commit generalises the template signatures of the map utilities
to support such maps and adds SFINAE detection for `find()` with any
arbitrary key type where appropriate, thereby supporting transparent
heterogeneous access in `map_contains()` and `map_at_or()`.
@peddie peddie requested review from jbangelo and jtec October 15, 2025 11:59
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

Successfully merging this pull request may close these issues.

1 participant