glm::ivec2 as key in unordered map

You need to specify a hash class and a comparator class in your typedef. See template params Hash and KeyEqual here: http://en.cppreference.com/w/cpp/container/unordered_map

it will look like that (consider the const qualifiers at the end of the method signatures):

struct KeyFuncs
{
    size_t operator()(const ivec2& k)const
    {
        return std::hash<int>()(k.x) ^ std::hash<int>()(k.y);
    }

    bool operator()(const ivec2& a, const ivec2& b)const
    {
            return a.x == b.x && a.y == b.y;
    }
};


typedef unordered_map<ivec2,int,KeyFuncs,KeyFuncs> MyMap;

hashes are built in to the glm library, however they are part of the exensions so just do this after you include glm and then you won't need to write your own hash:

#define GLM_ENABLE_EXPERIMENTAL
#include "glm/gtx/hash.hpp"

Just look at the linker error, it tells you what you should implement or provide in the list of template arguments:

std::hash<glm::detail::tvec2<int> >::operator()(glm::detail::tvec2<int>) const

The program doesn't know how to create a hash based on the vector object. You'd have to calculate your own hash, so the map code is able to differentiate between vectors.

Edit: I'd tend to use pointers to vectors, as this might screw up if you add some element and change it later on (so you should add const objects).


Edit 2: With the updated code/error message, it seems like you forgot to make the methods inside KeyTaits const, so their this pointer is of type KeyTraits*, but the value passed is meant to be const KeyTraits*.