title: Using mpz_t as key for std::map
body: <p>I am trying to build a map from <code>mpz_t</code> keys to <code>uint</code> values. I don't know why but the <code>mpz_t</code> keys can somehow not be looked up in the map.</p>
  
  <pre><code>mpz_t leftSideValues[1 &lt;&lt; 20];
  
  int main()
  {
      std::map&lt;mpz_t, uint&gt; leftSide;
  
      for (uint i = 0; i &lt; 1 &lt;&lt; 20; i++)
      {
          mpz_init(leftSideValues[i]);
  
          // compute some stuff here...
  
          // now save the computed value to our map
          leftSide[leftSideValues[i]] = i;
  
          // do a lookup to see whether our value can be found
          std::cout &lt;&lt; leftSide.at(leftSideValues[i]) &lt;&lt; " -- " &lt;&lt; i &lt;&lt; std::endl;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>The expected output would be a lot of lines looking like "0 -- 0", "1 -- 1" etc. but that does not happen. Instead:</p>
  
  <pre>terminate called after throwing an instance of 'std::out_of_range'
    what():  map::at</pre>
  
  <p>Is there some other step that I need to take to make <code>mpz_t</code> be usable in a map?</p>