Here you can use find(v.begin(), v.end(), name) == v.end() or just contains(v, name) from SnapperTmpl.h.