Just want to point out that C++11 now has std::hash (http://en.cppreference.com/w/cpp/utility/hash) which is defined for strings. That being said, I don't know if it can do compile time hashing.