<html>
<head>
<base href="http://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 --- - crashes during template type deduction"
href="http://llvm.org/bugs/show_bug.cgi?id=21096">21096</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>crashes during template type deduction
</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>MacOS X
</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>ryan.burn@gmail.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>crashes during template argument deduction. Attached original c++ file (uses
Facebook fatal library), as well as generate files.
The code gives this error when compiling with g++:
main.cpp: In function 'int main()':
main.cpp:106:79: error: no matching function for call to
'slice(fatal::constant_sequence<int, 1, 2, 3, 4, 5>)'
main.cpp:106:79: note: candidate is:
main.cpp:84:3: note: template<int I, int J, class T, T ...Values> constexpr
decltype (to_constant_sequence(typename fatal::constant_sequence<T, Values
...>::list:: slice<I, J>)) slice(fatal::constant_sequence<T, Values ...>)
main.cpp:84:3: note: template argument deduction/substitution failed:
main.cpp: In substitution of 'template<int I, int J, class T, T ...Values>
constexpr decltype (to_constant_sequence(typename fatal::constant_sequence<T,
Values ...>::list:: slice<I, J>)) slice(fatal::constant_sequence<T, Values
...>) [with int I = 1; int J = 3; T = int; T ...Values = {1, 2, 3, 4, 5}]':
main.cpp:106:79: required from here
main.cpp:84:3: error: dependent-name 'typename fatal::constant_sequence<T,
Values ...>::list:: slice<I, J>' is parsed as a non-type, but instantiation
yields a type
main.cpp:84:3: note: say 'typename typename fatal::constant_sequence<T, Values
...>::list:: slice<I, J>' if a type is meant</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>