Thrive
contains.h
1 #pragma once
2 
3 template<typename Collection, typename Key>
4 bool
5 contains(
6  const Collection& collection,
7  const Key& key
8 ) {
9  auto iter = collection.find(key);
10  return iter != collection.end();
11 }
12