I need to define an unordered_map like this unordered_map, what is the syntax for defining and passing a hash and
If you are fine with using Boost, a cleaner solution is to rely on Boost's implementation of the hash function for pairs (which in fact does exactly what kerrek-sb explains in his answer). Therefore all you have to do is:
#include
#include
using namespace std;
using namespace boost;
unordered_map, int, hash>> table;