title: Is libstdc++ support for std::unordered_map incomplete?
body: <p>Related to <a href="https://codereview.stackexchange.com/q/31528/23476">this question</a> on CodeReview, I tried to use <code>std::unordered_map</code> with a custom allocator but apparently this does not work with gcc/clang and libstdc++. The error can be generated from initializing an empty hash map with a <code>std::allocator</code></p>
  
  <pre><code>#include &lt;unordered_map&gt;
  
  int main()
  {
      typedef std::allocator&lt;std::pair&lt;const int, int&gt;&gt; A;
      typedef std::unordered_map&lt;int, int, std::hash&lt;int&gt;, std::equal_to&lt;int&gt;, A&gt; H;    
  
      auto h = H{A()}; // ERROR, cannot find constructor H::H(const A&amp;)
  }
  </code></pre>
  
  <p><a href="http://coliru.stacked-crooked.com/a/a6f500ce8a9b749c" rel="nofollow noreferrer"><strong>Live Example</strong></a>.</p>
  
  <p><strong>Question</strong>: is libstdc++ support for constructing <code>std::unordered_map</code> with a single allocator as argument incomplete?</p>
  
  <p><strong>UPDATE</strong>: further inspection shows that, for almost all containers other than <code>std::vector</code>, uses of allocators in libstdc++ access typedefs and member functions of allocators directly, rather than through <code>std::allocator_traits</code>. This works for <code>std::allocator</code> but fails for all custom allocators, unless they verbosely add those members and typedefs directly.</p>