<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jhall1024+llvmbugs@gmail.com" title="Jesse Hall <jhall1024+llvmbugs@gmail.com>"> <span class="fn">Jesse Hall</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - std::basic_string requires Allocator to have a default constructor"
   href="https://llvm.org/bugs/show_bug.cgi?id=24933">bug 24933</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - std::basic_string requires Allocator to have a default constructor"
   href="https://llvm.org/bugs/show_bug.cgi?id=24933#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - std::basic_string requires Allocator to have a default constructor"
   href="https://llvm.org/bugs/show_bug.cgi?id=24933">bug 24933</a>
              from <span class="vcard"><a class="email" href="mailto:jhall1024+llvmbugs@gmail.com" title="Jesse Hall <jhall1024+llvmbugs@gmail.com>"> <span class="fn">Jesse Hall</span></a>
</span></b>
        <pre>You're right. I'm terribly sorry. I was trying to simplify from something more
complex, came up with the same error, and assumed I'd simplified correctly.

For what it's worth, the real problem is essentially:

typedef std::basic_string<char, std::char_traits<char>, MyAllocator<char>>
MyString;
typedef std::unordered_map<MyString, void*, std::hash<MyString>,
std::equal_to<MyString>, MyAllocator<std::pair<const MyString, void*>>>
MyUnorderedMap;
...
MyUnorderedMap um;
um.insert(std::make_pair(str, ptr));

Something in insert() is default-constructing the pair<MyString,void*>, which
default-constructs MyString, and fails.

I'll go do my homework properly this time and figure out if this is
expected/correct, and if so, whether there's a valid way to avoid the default
construction.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>