<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 --- - [regression] libstdc++4.9 get tuple element by type broke"
href="https://llvm.org/bugs/show_bug.cgi?id=27601">27601</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[regression] libstdc++4.9 get tuple element by type broke
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>gonzalobg88@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>The following code compiles fine with clang@264182 and libstdc++4.9 (which
supports C++14 get tuple element by type) using: clang++ -std=c++14 file.cpp
#include <tuple>
int main() {
std::tuple<int, double, char> t;
std::get<double>(t);
return 0;
}
But breaks with the following error message on clang trunk (268219):
~/test> clang++ -std=c++14 file.cpp
In file included from file.cpp:1:
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../include/c++/4.9/tuple:791:14:
error: no matching function for call to '__get_helper2'
{ return std::__get_helper2<_Tp>(__t); }
^~~~~~~~~~~~~~~~~~~~~~~
file.cpp:5:8: note: in instantiation of function template specialization
'std::get<double, int, double, char>' requested here
std::get<double>(t);
^
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../include/c++/4.9/tuple:779:5:
note: candidate template ignored: deduced type '_Tuple_impl<3UL, double> &' of
1st parameter does not
match adjusted type 'tuple<int, double, char>' of argument [with _Head =
double, __i = 3, _Tail = <>]
__get_helper2(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
^
/usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../include/c++/4.9/tuple:784:5:
note: candidate template ignored: deduced type 'const _Tuple_impl<3UL, double>
&' of 1st parameter does
not match adjusted type 'tuple<int, double, char>' of argument [with
_Head = double, __i = 3, _Tail = <>]
__get_helper2(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
^
1 error generated.</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>