<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - <tuple> header prevents valid code from compiling"
href="https://llvm.org/bugs/show_bug.cgi?id=31513">31513</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td><tuple> header prevents valid code from compiling
</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>Linux
</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>matt@godbolt.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>(reported on behalf of Bjorn Fahller; he cannot get a new account created).
The following (believed to be correct) code fails to compile with svn rev
290809 with `-std=c++1z -stdlib=libc++` :
--
#include <tuple>
struct S { int s; };
int main()
{
S const s{99};
auto& [p] = s;
return p;
}
--
Quoting Bjorn:
"The above program fails on a home built clang+libc++ at svn rev 290809 when
compiled with '-std=c++1z -stdlib=libc++'
To make it compile, comment out the '#include' line.
I believe the bug is in libstdc++ rather than in clang++ itself.
It's very similar to, but not identical with,
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78939">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78939</a>
Strictly speaking, neither `const` nor `&` capture is needed to expose the
problem, but since it *does* make a difference in the gcc libstdc++-case, I
choose to include it."
Bjorn emailed a while back asking for a login to report it himself.</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>