<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 --- - Incorrect handling of ambiguous typed std::get(std::tuple)"
href="https://llvm.org/bugs/show_bug.cgi?id=29312">29312</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect handling of ambiguous typed std::get(std::tuple)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</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>C++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jakub.gargul@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Program using typed std::get is required to be ill-formed when retrieved type
occurs more than once inside a tuple:
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3584.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3584.html</a>
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.</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>