Subject: Why is heterogenous container lookup so limited?
Date: 2019-12-17 08:29:29
I've recently got exited about MSVC implementing P0919R3 "Heterogeneous
lookup for unordered containers". I've been using a horrible hack to
simulate this behaviour for string-lookup which I wanted to get rid up.
Unfortunately I noticed that in practice, only a few methods are
covered. Namely "find", "count", "contains" and "equal_range". While
this is technically enough to do everything with the map, I still wonder
why this is not implemented for the other functions like "at",
"extract", and so on. Especially the lack of support for the "at"
function made me scrap the idea of using this innovation, as it would
complicate my code.
So yeah, my question is, why is P0919R3 only implemented for the
least-minimum required functions, and not for the rest of the interface?
I see this is the same for ordered containers, and I think this adds an
unnecesary level of consideration by having to change your code, to a
feature that really should only be a direct go-to, if you know what I
STD-DISCUSSION list run by firstname.lastname@example.org
Older Archives on Google Groups