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

    <tr>
        <th>Summary</th>
        <td>
            Throwing a non-copyable exception
        </td>
    </tr>

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

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

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

<pre>
    `clang -std=c++20` accepts the following program:

```
struct S
{
  S() = default;
  S(const S&) = delete;
};

int main()
{
  try {
    throw S();         // #1
  } catch (S s) {
    return 1;
  }
}
```

but it is ill-formed at #1 according to [except.throw] p5. (We need to be able to copy exception objects in a type-erased manner for `std::exception_ptr` on implementations without reference-counted exceptions.)

Cross-reference: gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106812
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtU9tuozAQ_RrzMgIZk0B44KFt1B_oSvtYGTMBV8ZGttls9ut3TJqke0Ej2-O5HZ8ZejdcOlZzZaQdIQ9xYNVRMfFMIjgZQCqFSwwQJ4STM8adNXku3o1ezqx6YvzI-G2t-adsaoh-VRHePo3N8_UAdCMOTLRAtWDAk1xNZNUfVuVsSJGifvgZjHh3Y83xcd5WbSPMUttr7n9qRn-BLypdTN6db1AoF9w-Jl5JaKvKmzdVAyWjmuj28AZhA_U1mce4egvll2ckhHeo_6PnuvZrBE0SQBuTn5yfcQAZt_KJfOeHRHh0wPbP-DM1o9igs_0Rln2REH1HsEhh5NQjyN5gOiq3XOAaoZ0F13-gokZqCxLiZcEcvQwUNUtr0VNzPRC2bQSeSO6R70v0aRIoh54XgzPaKJMhwFnHydEDPJ7Qo1WYK7faSEnv0aF4dGNbX7wLIb9HUCUYlYJ-HWGKcQmp-tYBui1GuxbOj6SR_RcxJOkYJnd-J71Qo2bVq04zW_L6UIoMu7KuRcmritfZ0FVDW7Uyizoa7L4l1hKXEqyzeaJno-oONVu96f7CQA9c-0K5mRRjfty2nH6ARCepOoQVaSJe982-bLOpaw-7qqkObaNaVTdcVPu-VrT1qtzVddVmRvZoQkf9ZEJYPMOWgs7U0kx3ggvBWy54IyigwL7cqV27GyTHtq5ObMeR5twUCUciJ_PdBokYCWQ0OsTwMMoQ9EjTsZWj_HKllvnuA22Y5erRZ1v1bkP_G6pUNXE">