title: using a templated key in std::unordered_map
body: <p>I don't understand why my compiler won't accept code below</p>
  
  <pre><code>#include &lt;unordered_set&gt;
  #include &lt;unordered_map&gt;
  
  template&lt;class T&gt;
  using M = std::unordered_set&lt;T&gt;;
  
  template&lt;class T&gt;
  using D = M&lt;T&gt;;
  
  template&lt;class T&gt;
  using DM = std::unordered_map &lt; typename M&lt;T&gt;::const_iterator    // Problem
                                , typename D&lt;T&gt;::const_iterator &gt;; // Problem
  
  int main(int argc, char ** argv)
  {
      D&lt;int&gt; d;
      M&lt;int&gt; m;
      DM&lt;int&gt; dm; // Problem
  }
  </code></pre>
  
  <p>The compiler command is</p>
  
  <pre><code>clang++ -std=c++14 test.cpp -o test
  </code></pre>
  
  <p>A compiler error message excerpt is</p>
  
  <pre><code>/usr/bin/../lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/hashtable_policy.h:85:11: error: 
        implicit instantiation of undefined template
        'std::hash&lt;std::__detail::_Node_const_iterator&lt;int, true, false&gt; &gt;'
          noexcept(declval&lt;const _Hash&amp;&gt;()(declval&lt;const _Key&amp;&gt;()))&gt;
  </code></pre>
  
  <p>Why isn't it allowed to use <code>typename M&lt;T&gt;::const_iterator</code> as key in <code>std::unordered_map</code>?</p>