#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

template<typename T, typename C>
bool IsIn(const T& t, const C& c)
{
	return std::find(begin(c), end(c), t) != end(c);
}

int main() {
	int check = 2;
	auto v = {1, 2, 3};
	if (std::find(v.begin(), v.end(), check) != v.end())
	   cout << "found" << endl;
	   
	if (IsIn(check, v))
	   cout << "found too" << endl;
	   
	return 0;
}