Y
Hacker News
new
|
ask
|
show
|
jobs
by
wmu
2711 days ago
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...
1 comments
mmisu
2711 days ago
Are you confusing
.count
with
.contains
?
link
wmu
2711 days ago
I'm saying that map.contains(x) == bool(map.count(x))
link
mmisu
2711 days ago
+1 I see what you mean now.
link
wmu
2711 days ago
Great! :) My initial comment wasn't clear, sorry for that.
link