C++ Logo

STD-DISCUSSION

Advanced search

Subject: Why is heterogenous container lookup so limited?
From: privat_at_[hidden]
Date: 2019-12-17 08:29:29


Hello,

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
mean.

Best regards,
Julian Watzinger



STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups