[llvm-bugs] [Bug 31513] New: <tuple> header prevents valid code from compiling
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 2 15:00:04 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31513
Bug ID: 31513
Summary: <tuple> header prevents valid code from compiling
Product: libc++
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: matt at godbolt.org
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
Classification: Unclassified
(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,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78939
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170102/97d68c62/attachment.html>
More information about the llvm-bugs
mailing list