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

    <tr>
        <th>Summary</th>
        <td>
            Implement `make_unique_for_overwrite`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          lenards-speechmatics
      </td>
    </tr>
</table>

<pre>
    Version:
clang 15.0.0
compiler options: `-std=c++20 -stdlib=libc++ -O2 -pedantic-errors`

`std::make_unique_for_overwrite` does not seem to be implemented. The function was introduced in P1020 then renamed in P1973. https://clang.llvm.org/cxx_status.html don't seem to track these papers. It is in the latest C++20 draft https://timsong-cpp.github.io/cppwp/n4868/unique.ptr#lib:make_unique___ .

I also found https://reviews.llvm.org/D93590 which doesn't seem to be merged.

```cpp
#include <memory>

int main() {
    auto x = std::make_unique_for_overwrite<int[]>(42);
    auto y = std::make_unique_for_overwrite<int>();
}
```

https://godbolt.org/z/88Ys1jojP
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVE1zmzAQ_TXismMGJMzHgUMStzM5NYdOZ3ryCFiDEiFRScRJf30X7CSOD52WEQiepbdv367c2O61_oHOK2uYuGHJjiU3rZamh3QbJ3FyRuw4KY0O7BRopaelwPJk40PHxK5l_JYGT2ABtGoIo-cZhs03DpsJO2mCajfonHWeNp-Yz888WaluaIzyCfezUb9m3B-s29tndEenAtIi6Cx6MDaARxwhWGgQ1DhpHNEE7GL4PiAcZtMuMuEoPSgTnO3mFjt6hYc0IZlhQAMOjRzf0KoQMQwhTEtqjH-lsboQa_08xtb1C_DysvdBhtnHQxg1aTGMFx9SgpPt08LtESY5kakx3AdQi4YFBi0D-gB373Z1Th7CVdigRm9Nv2mnKe5VGOYmVnaJPk3HiWaTlXlJ88mheAqOcbF6_sm5_R7iS4fvQWpv4WBn011FdPis8OgvU91VYlslcBxUO6yef86UTB_R9eT3VRFPg6SeES6UafXcITBxN-Jo3SsTXy43UXlglIr4KakKWHF7woEuOVOsF9q6g3_oDnFHXGx7y7a7JQYvM06MTFwTvv4f4Up1ScSK3VW-l_l8tra3XWN1OLv6m-6y_OnTR_v4EGGd5nkmioLnVdTVoqtEJaOggsb6_q2ll1P2twMRzU7XVzFPTUNHlj6Wmp6nzeTsI7aBPpX3M3p62ZZJxqOhrjDPS5k1lcx5Vh4wESKtOmxSfjhUoswjLRvUvj7ZG6maJ5wnFS_TbZImVZw3XV5glWdFKctWNixLkKqq33sqcvWqoZl7Tz9q5cNHw0XSe9UbxDd-qtNgaQedUNf5jZ8Q22GU9Pfho1V7vQr_A4Tfexo">