<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ldionne@apple.com" title="Louis Dionne <ldionne@apple.com>"> <span class="fn">Louis Dionne</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - std::allocate_shared can't allocate object with private constructor"
   href="https://bugs.llvm.org/show_bug.cgi?id=41900">bug 41900</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;">CC</td>
           <td>
                
           </td>
           <td>ldionne@apple.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Fixed By Commit(s)</td>
           <td>
                
           </td>
           <td>955dd7b7f3f6df79f573508ffb567f3923e892f7
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - std::allocate_shared can't allocate object with private constructor"
   href="https://bugs.llvm.org/show_bug.cgi?id=41900#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - std::allocate_shared can't allocate object with private constructor"
   href="https://bugs.llvm.org/show_bug.cgi?id=41900">bug 41900</a>
              from <span class="vcard"><a class="email" href="mailto:ldionne@apple.com" title="Louis Dionne <ldionne@apple.com>"> <span class="fn">Louis Dionne</span></a>
</span></b>
        <pre>This should have been fixed by <a href="https://reviews.llvm.org/D91201">https://reviews.llvm.org/D91201</a>. Please reopen
if you still see the original issue (or another issue!).

commit 955dd7b7f3f6df79f573508ffb567f3923e892f7
Author: Louis Dionne <<a href="mailto:ldionne.2@gmail.com">ldionne.2@gmail.com</a>>
Date:   Fri Dec 11 12:22:16 2020 -0500

    [libc++] LWG2070: Use Allocator construction for objects created with
allocate_shared

    This patch updates `allocate_shared` to call `allocator_traits::construct`
    when creating the object held inside the shared_pointer, and
    `allocator_traits::destroy` when destroying it. This resolves
    the part of P0674R1 that was originally filed as LWG2070.

    This change is landed separately from the rest of P0674R1 because it is
    incredibly tricky from an ABI perspective.

    This is the reason why this change is so tricky is that we previously
    used EBO in a compressed pair to store both the allocator and the object
    type stored in the `shared_ptr`. However, starting in C++20, P0674
    requires us to use Allocator construction for initializing the object type.
    That requirement rules out the use of the EBO for the object type, since
    using the EBO implies that the base will be initialized when the control
    block is initialized (and hence we can't do it through Allocator
construction).
    Hence, supporting P0674 requires changing how we store the object type
    inside the control block, which we do while being ABI compatible by using
    some trickery with a properly aligned char buffer.

    Fixes <a href="https://llvm.org/PR41900">https://llvm.org/PR41900</a>
    Supersedes <a href="https://llvm.org/D62760">https://llvm.org/D62760</a>

    Differential Revision: <a href="https://reviews.llvm.org/D91201">https://reviews.llvm.org/D91201</a></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>