title: Build fails for unordered_map with pair as a key (C++)
body: <p>I see it is possible ot use <code>std::pair</code> as a key for <code>std::unordered_map</code>. In my case I need to use <code>std::type_index</code> in the pair. However have some problems building it. My code is:</p>
  
  <pre><code>template&lt;class Base, class Result, bool Commutative&gt;
  struct Multimethod2
  {
      using Args = std::pair&lt;std::type_index, std::type_index&gt;;
      using Method = std::function&lt;bool(Base *, Base *)&gt;;
  
      struct ArgsHash {
          std::size_t operator () (Args &amp;p) const {
              std::size_t h1 = std::hash&lt;std::type_index&gt;()(p.first);
              std::size_t h2 = std::hash&lt;std::type_index&gt;()(p.second);
              return h1 ^ h2;
          }
      };
  
      struct KeyEqual
      {
          bool operator()(const Args &amp;a1, const Args &amp;a2) const
          {
              return (a1.first == a2.first &amp;&amp; a1.second == a2.second) ||
                     (a1.first == a2.second &amp;&amp; a1.second == a2.first);
          }
      };
  
      std::unordered_map&lt;Args, Method, ArgsHash, KeyEqual&gt; methods;
  ...
  }
  </code></pre>
  
  <p>Got errors:</p>
  
  <pre><code>/usr/include/c++/7/bits/hashtable_policy.h:87: error: no match for call to ‘(const Multimethod2&lt;Shape, bool, true&gt;::ArgsHash) (const std::pair&lt;std::type_index, std::type_index&gt;&amp;)’
    noexcept(declval&lt;const _Hash&amp;&gt;()(declval&lt;const _Key&amp;&gt;()))&gt;
            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
  
  /usr/include/c++/7/bits/hashtable_policy.h:87: error: binding reference of type ‘Multimethod2&lt;Shape, bool, true&gt;::Args&amp; {aka std::pair&lt;std::type_index, std::type_index&gt;&amp;}’ to ‘const std::pair&lt;std::type_index, std::type_index&gt;’ discards qualifiers
    noexcept(declval&lt;const _Hash&amp;&gt;()(declval&lt;const _Key&amp;&gt;()))&gt;
            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
  
  /usr/include/c++/7/type_traits:154: error: ‘value’ is not a member of ‘std::__and_&lt;std::__is_fast_hash&lt;Multimethod2&lt;Shape, bool, true&gt;::ArgsHash&gt;, std::__detail::__is_noexcept_hash&lt;std::pair&lt;std::type_index, std::type_index&gt;, Multimethod2&lt;Shape, bool, true&gt;::ArgsHash&gt; &gt;’
      : public integral_constant&lt;bool, !_Pp::value&gt;
                                        ^~~~
  
  ...
  </code></pre>
  
  <p>What is wrong with syntax here? </p>