<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/65788>65788</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            `std::allocate_shared` does not use `std::allocator_traits<Alloc>::destroy` on C++17 - cppreference says it should (?)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          burnpanck
      </td>
    </tr>
</table>

<pre>
    That said, [cppreference.com](https://en.cppreference.com/w/cpp/memory/shared_ptr/allocate_shared) does state that `::allocate` is only used from C++20 onwards. There is no corresponding info regarding `::destroy`. Possibly, this is a documentation error on cppreference instead. Unfortunately, I do not have access to the standard, so I cannot verify. libstdc++ does call `::destroy` in C++17 mode though.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsk0FvqzoQhX_NsBkVOSaQsGDRtA-pu7foW1fGHoLfNR7kMa3y769I2ntbtSuEOczM-XzGiPhzJOqgPkH9WJg1T5y6YU1xMdH-KgZ2l-55MhnFeAf6AaE-2WVJNFKiaKm0PEP9CPo45bwIVPege9A9xfKbTPdvoHu7LKD7mWZOF9C9TCaRe1lyAt2bENiaTC-3U9AtOiZBySYT5m0OaNTWpLr_0EKj0AtyDBdchRyOiWd8AH0CfdIKOb6Z5KTE54kSbdLIaDklkoWj8_GMPo6Mic4mXV__tHAkOfEFGlXivyzih3DZGOTJy1bIoGO7zhSzyZ4jUkqckCN-to4-SibjSvwvjpzyGk2mW50ndIyRM07mldBYSyKYGfNEm-XoTLoyF8YntCZu0ldKfryUGPwg2dmbzRsla0L4aXj08YPH7oAzuw0lr-epLFxXubZqTUHdrmn3u_ag20MxdUNrmrZuTN1Uaq_roWqr4TCM1WjVoNphLHynla5Uq467o95Vh3Jfu_Fw1I1qqVLONbBXNBsfyhBe55LTufAiK3VNfTgei2AGCnKNndaR3vD6EbTeUpi67Z-7YT0L7FXwkuVvlexzoA4aJdl9DcJHaBp1w7HRWoXwBy2nl5yMzwLVw_12BNU_36jxZ2p3X-9UzEXQZ5SJ1-AQ9BGqHnRbrCl0Xzfh7PO0Du8LsNl4f9wtif8nm0H3V_MCur_C-R0AAP__k-wq1A">