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

Are you confusing .count with .contains ?
I'm saying that map.contains(x) == bool(map.count(x))
+1 I see what you mean now.
Great! :) My initial comment wasn't clear, sorry for that.