Here is my problem. I am using one of the implementations of TR1 that
has a hash_map template.

for all the simple types hash_map<Key,Data> works because

Code:
namespace std
{
  template<typename T>
  struct hash
  {
    size_t operator(const T&t) {  }
  };
};
has been specialized for them (i.e. int, char, bool, etc)

If you want to write your own key type, you can:

Code:
struct MyKey
{
  int x;
  int y;
};

namespace std
{
    template<>
    struct hash<MyKey>
    {
      size_t operator()(const MyKey &mk) { return x<<16 + y; }
    };
};
My problem is this:

I have a template class thus:

Code:
template<typename T>
class TKey
{
  size_t hash() { return // hashy number }
  .
  .
  .
};
I can't figure out what the syntax is to define a std::hash<> specialization
that will implicitly specialize any specialization of the generic TKey template.
The inner code should be very simple:

Code:
template<>
hash<KeyType>
{
  size_t operator()(const KeyType &k) { return k.hash(); }
};
but my research has given me no clues into how to wrap this in some
kind of template mechanism that allows me to specify that this should be
a generic template that can be specialized against a particular specialization
of a TKey.