The paper proposes to add a member function contains, that checks, whether or not a given element exists in a container, to standard associative containers
if (some_set.find(element) != some_set.end()) {
// ...
}
An alternative is using the count method. Downsides:
Qt associative containers implement contains. It is a more common operation than find. Estimate done by Thiago Macieira (for Qt codebase):
Straw poll: member function vs free function.
Considerations for the "free function" option: