C++20 added the method contains() to associative and unordered containers.
This method checks for the presence of an element, simplifying the typical pattern of invoking find() and comparing against the end iterator.
Click to open in Compiler Explorer.
Leave a comment