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: unassignedclangb...@nondot.org Reporter: m...@godbolt.org CC: llvm-bugs@lists.llvm.org, mclow.li...@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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs