Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
wmu
· 7y ago · 0 comments
std::unordered_map has method count(), C++20 will be probably just a wrapper for the method.
https://en.cppreference.com/w/cpp/container/unordered_map/co...
Comments
[–]
mmisu
7y ago
Are you confusing
.count
with
.contains
?
[–]
wmu
OP
7y ago
I'm saying that map.contains(x) == bool(map.count(x))
[–]
mmisu
7y ago
+1 I see what you mean now.
[–]
wmu
OP
7y ago
Great! :) My initial comment wasn't clear, sorry for that.