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

    <tr>
        <th>Summary</th>
        <td>
            [LLVM 17][libc++] Cherry-pick the fix for std::expected UB related to the has-value flag
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++
      </td>
    </tr>

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

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

<pre>
    We should cherry-pick this PR (https://github.com/llvm/llvm-project/pull/68733) which fixed this issue (https://github.com/llvm/llvm-project/issues/68552). Doing this is not an ABI break (unlike the follow-up https://github.com/llvm/llvm-project/pull/69673 which is an ABI break, and we're still undecided about this one).

I think it makes sense to make the present fix regardless of what we end up doing for the tail-padding issue (the ABI breaking one).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycUttu3CAQ_Rr8MtoVhvjCgx92s1opUipVldo-YzO26RKwuGSTv68glzavKyFuw5w5czgyBL1YxIE0R9KcKpni6vxglHbWYjU69Tr8RgirS0bBtKL3r7tNTxeIqw7w_QcQ1q8xboHwA2Fnws6Ljmsa95N7IuxszPPHstu8-4NTJOy8JWMIO7d9xzlhAq6rnlaY9QuqN1wdQsKboEtmKOBNwwgTezg5bZcPXLAugrRwOD7A6FFecpVkjb4gxBVhdsa46y5tcHNXou34e0s6fKlF2D1Iq-CKhHUeIURtDCSrcNIKFcjRpfjG1FnM5Ak9EXp4mx9yxF5AR3iSFwwQ0AaE6MqxsN88BrQxSwkeF-mVwRDAzXBdZYQrAloFaQNVNJmdL2lRarPbpFL58lP7HPmkniPvnCo1cCW4kBUOdSv6VrBedNU6zIyzbhL1He_rpmv6Wo6UTqNox7nhvFeVHhhlvKac1oL2Nd8z5GpSKEXbNEK2lNxRfJLa7LO0e-eXqrAZOtrRvjJyRBOKVRkzepwIO5bBsnX9UP5jTEsgd9ToEMM_mKijKSZ_fPz1DeqONCfSHP_DaE5w_8XdWETMCoWosg34AV82nCIq-HkEj0bmbXTl7SrD7lmahDAbuVTJm-F265Zu_wYAAP__hVoqjA">