<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJylk8uu2yAQhp8Gb1AsG-zEXrDIrd1X2ZxVBWZsUxGTAk6UPn3HjqO0p0ddtBIIhsvMxz-Dcvoujlfwd9q4Acdohm6ahujHJho3EPZJhmC64QxDpK13Z0rW2TiY7yN8vUSPBo1uWgu99KCfa2agfYyXQPgWXWDrnFbOxtT5Dq0f2LV_c0f_eX2loXej1bSVxqb01AO9eKcsnGU0DW1kgEDR9-QqO5AMHW7_wvgHDd-fCD9OUB_gT5vljpSHxxHC9lQO-h_jKET91dvHATV4cwX9W9g5nnKxp66lt940_awGjSgGYQyPvCHNLGxApvMFpUGF6M3gFVw-PXbx6EIszRDT5RnLY6ovYGXEwHz7LjcergZuIbX2el4SdMjzTV2vCasf1xMtuK55LRM5xt55sce33vfSR_DJ6K14l23kGlWKpGhMbpdhhZn9Bk1E04QwQsBJyfm6SnqhC6agrdeyqrKyzjZVUfO2aqXkm7ws2yqxUoENYhKOMTV2kzCYLxysUQ1hu7kxVDX5fx4jWMZYljOeV0WR8bTlumQAWQ66yEFKUmRYoVixT9USL2aXSBZw05oQX5Imj8oBEI-8J9FEC2LnujHQV3msolu9Smr5lAFrLzw_iQLaOq-M1jAkM7OYgX8CcZA25g>53368</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Bogus unique_ptr-to-shared_ptr conversions should be forbidden
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
CaseyCarter
</td>
</tr>
</table>
<pre>
Every converting construction/assignment from `unique_ptr` to `shared_ptr` in https://godbolt.org/z/drYoErG6v should fail. The problematic cases are:
* construction/assignment to `shared_ptr<T>` from `unique_ptr<T[]>`, and
* construction/assignment to `shared_ptr<base[]>` from `unique_ptr<derived[]>`
both of which fail the "`Y*` is compatible with `T*`" constraint.
(Related: https://reviews.llvm.org/D117996)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydUsuu2yAQ_Rq8QbFsiJ1kwSKvdl9lc1cVmLFNhU0K2FH69R07jtLeXt1FJRAMjzNnzhzl9F2cR_B3Wrke12j6ZtqG6IcqGtcT9kWGYJq-gz7S2ruOkjIbevNzgO_X6DGg0U1noZUe9PPM9LSN8RoI3yMEjsZp5WxMnW8w-oVT-zd39l_LkYbWDVbTWhqb0ksL9OqdstDJaCpayQCBIvYElZ1IhoD7Tzj-w4YfL4SfJ1If0J8uiwMpTo8nhB2p7PV_5lFI9U-0jxNq8GYE_VfaOZ9ysaWuprfWVO2sBo0oBmEMn7whm1nYgJy6K0qDCtGbwS94fHnc4tOFsTR9TJcylmK238DKiIn5_l1vPIwGbiG1duyWBp3yfLPblYTtHt8TLbje8Z1MookWxME1Q6CvulbRrV5aLG4KKFp4dlcBrZ1XRmvok8Fb8c4fWMmgUqwNg4nIsqzQCz-gihiaEAYIuCk4L7dJK-oCMl7pgtV1KUvG81pBDpsy48WmLvI8sVKBDWKSmjE1NJOU2GFcrFEVYYd5MOxDYgTLGMtyRNmu1xlPa47AAFkOep2DlGSdoSPRoU-VEi9mgogb8NKaEF8SJg-nAIhHnxM5xNZ5cUSL3I_SR_DJXI-Yi_kNL-AhrQ">