As stated, the reason for your initial error was that you had to include <string> . However, you may have another problem:
unordered_map<const string, tuple<int, int> > Layout;
You (possibly) need to remove const from this line:
unordered_map<string, tuple<int, int> > Layout;
It may not be necessary on your compiler, but it is on mine. First of all, const is redundant, map / unordered_map keys are const any, but that is not a problem. The problem is that the hash function template does not work for const types.
The following simple program isolates the problem for me:
#include <functional> int main (int argc, char *argv[]) { std::hash<const int> h; h(10); }
http://ideone.com/k2vSy
undefined reference to `std::hash<int const>::operator()(int) const'
I cannot explain this at the moment.
source share