<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 - P0031 should apply to std::array<T, 0> as well"
href="https://bugs.llvm.org/show_bug.cgi?id=43890">43890</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>P0031 should apply to std::array<T, 0> as well
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>jdoerrie@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Currently std::array<T,0>'s member functions miss constexpr qualifications as
specified by <a href="https://wg21.link/p0031">https://wg21.link/p0031</a>. This results in the following code being
invalid, while it's handled fine by libstdc++ [1]:
constexpr std::array<int, 0> a0 = {};
constexpr auto ptr0 = a0.data();
Fixing this might require compiler magic, as reinterpret_cast is no longer
valid in std::array<T,0>::data().
[1] <a href="https://godbolt.org/z/04eTaL">https://godbolt.org/z/04eTaL</a></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>