<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 - [span] Incorrect return type of span<T, dynamic_extent>::subspan"
href="https://bugs.llvm.org/show_bug.cgi?id=44724">44724</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[span] Incorrect return type of span<T, dynamic_extent>::subspan
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</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>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>mschellenbergercosta@googlemail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>According to the standard (<a href="https://eel.is/c++draft/views.span#span.sub-10">https://eel.is/c++draft/views.span#span.sub-10</a>) the
return type of ```std::span<T>::subspan<T, Count>``` should be ``` span<T,
Count> ```.
However, it is currently ```span<T, dynamic_extent>```
Consequently, calling ```std::span<T>::subspan<T, 4>``` would return
``std::span<T>``` rather than the intended ```std::span<T, 4>```.
There is already a PR open for that (<a href="https://reviews.llvm.org/D71997">https://reviews.llvm.org/D71997</a>). Maybe
this raises awareness.</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>