<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - tuple_size cannot take reference types"
href="https://bugs.llvm.org/show_bug.cgi?id=41654">41654</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>tuple_size cannot take reference types
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>z.zoelec2@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Take the following example:
int main()
{
auto t = std::make_tuple(make_tuple(10, 10));
const auto arg_count1 =
std::tuple_size<std::remove_reference_t<decltype(std::get<0>(t))>>::value; //
works
const auto arg_count2 =
std::tuple_size<decltype(std::get<0>(t))>::value; // fails
}
The above program generates the error: Implicit instantiation of undefined
template 'std::__1::tuple_size<std::__1::tuple<int, int> &>'
It errors because `std::get` returns a reference type.</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>