<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - is_trivially_copyable_v misbehaves"
href="https://bugs.llvm.org/show_bug.cgi?id=39050">39050</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>is_trivially_copyable_v misbehaves
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>7.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>philippe.groarke@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Tested on various c++17 compatible versions on godbolt.
Assuming cppreference is correct
(<a href="https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable">https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable</a>) and my
interpretation of their text is also correct.
std::is_trivially_copyable_v doesn't follow the standard's definition.
Example 1, Trivial non-deleted destructor :
The deleted destructor should fail the check : <a href="https://godbolt.org/z/5BOO68">https://godbolt.org/z/5BOO68</a>
Example 2, at least one copy constructor, move constructor, copy assignment
operator, or move assignment operator is non-deleted :
There are no copy/move ctors or assignement operators, should fail the check :
<a href="https://godbolt.org/z/APcHua">https://godbolt.org/z/APcHua</a>
I tested on gcc with the same results. I'm assuming I've missed something.
Does libc++ use is_trivially_copyable_v internally for vector resize?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>