<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 --- - [Feature] Use compiler builtin to implement tuple_element"
href="https://llvm.org/bugs/show_bug.cgi?id=25671">25671</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Feature] Use compiler builtin to implement tuple_element
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ldionne.2@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=15364" name="attach_15364" title="Initial version of the proposed patch.">attachment 15364</a> <a href="attachment.cgi?id=15364&action=edit" title="Initial version of the proposed patch.">[details]</a></span>
Initial version of the proposed patch.
This patch uses the proposed compiler builtin `__nth_element` [1] to implement
`std::tuple_element` whenever possible. This results in interesting
compile-time speedups over the current implementation of `std::tuple_element`,
as explained in this blog post [2].
If there is interest for this patch both from Clang's side and libc++'s side, I
will update this patch after the review is done on Clang's side and merged into
Clang.
Louis
[1]: <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [Feature] Add a builtin for indexing into parameter packs"
href="show_bug.cgi?id=25670">https://llvm.org/bugs/show_bug.cgi?id=25670</a>
[2]: <a href="http://ldionne.com/2015/11/29/efficient-parameter-pack-indexing">http://ldionne.com/2015/11/29/efficient-parameter-pack-indexing</a></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>