<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 - [Concepts] Constrained 'decltype(auto)' incorrectly treated as 'auto'"
href="https://bugs.llvm.org/show_bug.cgi?id=48412">48412</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Concepts] Constrained 'decltype(auto)' incorrectly treated as 'auto'
</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++2a
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>arthur.j.odwyer@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>// <a href="https://godbolt.org/z/xxeafq">https://godbolt.org/z/xxeafq</a>
template<class> concept C = true;
int w;
int& r = w;
C decltype(auto) rr = r; // rr's type should be 'int&', but is 'int'
That is, 'C decltype(auto) rr = r;' SHOULD be treated exactly like
'decltype(auto) rr = r; static_assert(C<decltype(rr)>);' but in fact Clang is
losing the fact that it's supposed to be a reference type.
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [Concepts] void f(Constrained decltype(auto)) should be rejected"
href="show_bug.cgi?id=48384">Bug 48384</a> is probably related. From the outside, it feels like Clang's parser
is just treating `C decltype(auto)` as a synonym for `C auto` everywhere it
appears.</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>