https://llvm.org/bugs/show_bug.cgi?id=29312
Bug ID: 29312 Summary: Incorrect handling of ambiguous typed std::get(std::tuple) Product: clang Version: 3.8 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++14 Assignee: unassignedclangb...@nondot.org Reporter: jakub.gar...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Program using typed std::get is required to be ill-formed when retrieved type occurs more than once inside a tuple: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3584.html Instead following code compiles successfully in clang++ 3.8.0 choosing the first matching type: #include <iostream> #include <tuple> int main() { std::tuple<int, int> tup{59, 56}; std::cout << std::get<int>(tup) << std::endl; return 0; } std::pair exhibits proper behavior and doesn't compile with ambiguous std::get. -- 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