<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 --- - convert type trait errors to english" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24258&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=N9pjkclZeksipfyf9Oy3kOwOBNUabivf05yrXBM6IlY&s=lNQusvtG5pghc4nrbKYgT5_hKijD-wIhnnmDOkGfXuw&e=">24258</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>convert type trait errors to english
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</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++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nlewycky@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The standard defines a pile of type traits like "is_convertible" (also,
"is_same", "is_base_of", "is_bind_expression", "is_placeholder", "is_void",
"is_constructable", ...) and we currently don't issue the best errors for
these.
$ cat b16776752-2.cc
#include <type_traits>
using namespace std;
struct X {};
struct Y {};
template<class U1, class U2,
class = typename enable_if<is_convertible<U1, U2>::value>::type>
constexpr void f();
void test() {
f<X, Y>();
}
$ clang++ -std=c++14 b16776752-2.cc
b16776752-2.cc:12:3: error: no matching function for call to 'f'
f<X, Y>();
^~~~~~~
b16776752-2.cc:8:37: note: candidate template ignored: disabled by 'enable_if'
[with U1 = X, U2 = Y]
class = typename enable_if<is_convertible<U1, U2>::value>::type>
^
1 error generated.
We should instead issue a note that "U1 is not convertible to U2" (given that
this is also a context where the is_convertible must resolve to true).</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>