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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] __is_trivially_assignable
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            rejects-valid
      </td>
    </tr>

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

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

<pre>
    In C++03, Clang claims that a struct containing a member with a deleted assignment operator is assignable, but diagnoses the instantiation as using a deleted function.

```c++
struct Element {
    Element& operator=(const Element&) = delete;
};

struct S {
    Element i;

    S& operator=(const S&) = default;
};

_Static_assert(!__is_trivially_assignable(S&, const S&)); // assertion fails
_Static_assert(!__is_assignable(S&, const S&)); // assertion fails

void test() {
    S s;
    S s2;
    s2 = s; // diagnosed as an error
}
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk92OmzwQhq9mOBltBGP-csDBJvkifce5gMiAAbfGjuwh1d59xc_uJlW3PalkGfwavc_MMCND0L1VqoLsANkpkhMPzle3QRurvxdFEdWufav-t3gEOgAdYgF0xKORtsfGSD0G5EEySgzsp4axcZalttr2KHFUY608_tA8oMRWGcWqxRU6KsvobspLdh512GRZGzUj6omx1bK3LqiZoVDbwNKylqydRRlwCivl3bebbDPf7SA-Qfy67Xm8rmZNYFW3YP8zagkDik1HxHcRKP8ID8QJqGycDfxwDbRHEKeND2LzgOL0-f5Iu_yWg_qXr-e7y1f0yxO3k5PhP4CvF5asm6sMQXkGKoGS61WHK3t919KYt-tj1cvV_YhPrHmJAwKdgc64Ws1_oJPahL9w_on7ut-dbpFVWO33z7W8YPhIfTvTkxBoKVl4YL1319yQKC0q753_rORz96zHqK1Euxd7GakqKZI0LanIi2io8k5QmmYdtVnaKqGSvMyEaGTeiU6WVES6opjSOBVxIhJKaUdpnoiypq5sKclqAWmsRqnNzpj7uHO-j3QIk6r2cR5nkZG1MmGZUqJmnj4Qr513lpVtgQjoCERefVMNh5e7NHpRs1Pkq9nwpZ76AGlsdODwiWDNZpn9ZaAhO-GX3RFN3lQD8y2AeF0r2GsepnrXuBHoPHtuj5ebd3MgQOclhwB0XtL4GQAA___hUlRV">