<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 --- - bogus error: no matching function for call to ... (candidate template ignored: substitution failure)"
href="https://llvm.org/bugs/show_bug.cgi?id=23207">23207</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>bogus error: no matching function for call to ... (candidate template ignored: substitution failure)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>janus@gcc.gnu.org
</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>Created <span class=""><a href="attachment.cgi?id=14193" name="attach_14193" title="test case">attachment 14193</a> <a href="attachment.cgi?id=14193&action=edit" title="test case">[details]</a></span>
test case
Compiling the attached test code with
clang++ logging.cc -std=c++11
results in the following error:
logging.cc:58:3: error: no matching function for call to
'create_all_loggers_impl'
create_all_loggers_impl<std::tuple_size<AreaTuple>::value>();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
logging.cc:47:32: note: candidate template ignored: disabled by 'enable_if'
[with index = 18]
inline typename std::enable_if<(index == 0)>::type create_all_loggers_impl() {}
^
logging.cc:51:52: note: candidate template ignored: substitution failure [with
index = 18]: non-type
template argument is not a constant expression
inline typename std::enable_if<(index != 0)>::type create_all_loggers_impl() {
^
1 error generated.
I see the same behaviour with clang 3.4.2 and 3.5.0 (haven't tried other
versions), while g++ 4.7 and upward compiles the file just fine.
Curiously, if I remove the last logarea ('R') in lines 25 and 28, the error
goes away.</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>