[prev in list] [next in list] [prev in thread] [next in thread]
List: llvm-bugs
Subject: [llvm-bugs] [Bug 90605] [Clang] __is_trivially_assignable
From: LLVM Bugs via llvm-bugs <llvm-bugs () lists ! llvm ! org>
Date: 2024-04-30 13:12:42
Message-ID: 20240430131242.246138b2f8d215b3 () email ! llvm ! org
[Download RAW message or body]
[Attachment #2 (text/html)]
<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-csDBJvkifce5gMiAAbfGjuwh1d5 \
9xc_uJlW3PalkGfwavc_MMCND0L1VqoLsANkpkhMPzle3QRurvxdFEdWufav-t3gEOgAdYgF0xKORtsfGSD0G5 \
EEySgzsp4axcZalttr2KHFUY608_tA8oMRWGcWqxRU6KsvobspLdh512GRZGzUj6omx1bK3LqiZoVDbwNKylqy \
dRRlwCivl3bebbDPf7SA-Qfy67Xm8rmZNYFW3YP8zagkDik1HxHcRKP8ID8QJqGycDfxwDbRHEKeND2LzgOL0- \
f5Iu_yWg_qXr-e7y1f0yxO3k5PhP4CvF5asm6sMQXkGKoGS61WHK3t919KYt-tj1cvV_YhPrHmJAwKdgc64Ws1 \
_oJPahL9w_on7ut-dbpFVWO33z7W8YPhIfTvTkxBoKVl4YL1319yQKC0q753_rORz96zHqK1Euxd7GakqKZI0L \
anIi2io8k5QmmYdtVnaKqGSvMyEaGTeiU6WVES6opjSOBVxIhJKaUdpnoiypq5sKclqAWmsRqnNzpj7uHO-j3Q \
Ik6r2cR5nkZG1MmGZUqJmnj4Qr513lpVtgQjoCERefVMNh5e7NHpRs1Pkq9nwpZ76AGlsdODwiWDNZpn9ZaAhO-GX3RFN3lQD8y2AeF0r2GsepnrXuBHoPHtuj5ebd3MgQOclhwB0XtL4GQAA___hUlRV">
[Attachment #3 (text/plain)]
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic