title: Compile error defining a std::hash for a template class nested class
body: <p>I have a class:</p>
  
  <pre><code>namespace App
  {
  
  template&lt;typename A, typename B&gt;
  class MyClass
  {
      //...
      class NestedClass
      {
          //...
      }
  }
  
  } //namespace App  
  </code></pre>
  
  <p>I would like to define a std::hash for NestedClass</p>
  
  <pre><code>//Definition of hash functions
  namespace std
  {
      //Definition of a hash to use generic pairs as key
      template&lt;typename A, typename B&gt;
      struct hash&lt;App::MyClass&lt;A,B&gt;::NestedClass&gt;
      {
      public:
          size_t operator()(const App::MyClass&lt;A,B&gt;::NestedClass &amp;it) const
          {
              return std::hash(it.toInt());
          }
      };
  }
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>source.h:1166: error: type/value mismatch at argument 1 in template parameter list for 'template&lt;class _Tp&gt; struct std::hash'
    struct hash&lt;App::MyClass&lt;A,B&gt;::const_NestedClass&gt;
                                                    ^
  </code></pre>
  
  <p>Any idea? Thanks! </p>