<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 - Rejects valid code with constructor accepting constrained auto parameter when the concept name is namespace qualified and has an explicit template argument"
href="https://bugs.llvm.org/show_bug.cgi?id=44673">44673</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Rejects valid code with constructor accepting constrained auto parameter when the concept name is namespace qualified and has an explicit template argument
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>C++2a
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david@doublewise.net
</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>The following well-formed code
```
namespace n {
template<typename, typename>
concept c = true;
}
struct s {
s(n::c<int> auto);
};
auto x = s(0);
```
is rejected by clang with the message
```
<source>:9:17: error: expected ')'
s(n::c<int> auto);
^
<source>:9:6: note: to match this '('
s(n::c<int> auto);
^
<source>:9:10: error: non-friend class member 'c' cannot have a qualified name
s(n::c<int> auto);
~~~^
<source>:9:10: error: field has incomplete type 's'
<source>:8:8: note: definition of 's' is not complete until the closing '}'
struct s {
^
<source>:12:10: error: no matching conversion for functional-style cast from
'int' to 's'
auto x = s(0);
^~~
<source>:8:8: note: candidate constructor (the implicit copy constructor) not
viable: no known conversion from 'int' to 'const s' for 1st argument
struct s {
^
<source>:8:8: note: candidate constructor (the implicit move constructor) not
viable: no known conversion from 'int' to 's' for 1st argument
struct s {
^
<source>:8:8: note: candidate constructor (the implicit default constructor)
not viable: requires 0 arguments, but 1 was provided
4 errors generated.
Compiler returned: 1
```</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>