<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - Crash during compilation of union-like class with template method which has auto return value"
href="http://llvm.org/bugs/show_bug.cgi?id=18628">bug 18628</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>rnk@google.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WORKSFORME
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - Crash during compilation of union-like class with template method which has auto return value"
href="http://llvm.org/bugs/show_bug.cgi?id=18628#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - Crash during compilation of union-like class with template method which has auto return value"
href="http://llvm.org/bugs/show_bug.cgi?id=18628">bug 18628</a>
from <span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span></b>
<pre>Thanks for the report. This looks like a bug that's been fixed since 3.3,
though. My clang from last week says:
$ clang -c C:/Users/rnk/Downloads/main.cpp -std=c++11 -o t.obj
C:/Users/rnk/Downloads/main.cpp:38:9: error: templates cannot be declared
inside of a local class
template<typename T>
^~~~~~~~~~~~~~~~~~~~
C:/Users/rnk/Downloads/main.cpp:46:8: error: no matching member function for
call to 'visit'
d1.visit(bool_visitor());
~~~^~~~~
C:/Users/rnk/Downloads/main.cpp:22:10: note: candidate template ignored:
substitution failure [with VisitorType = bool_visitor]: no member named 'visit'
in 'bool_visitor'
auto visit(const VisitorType &visitor) const
^
2 errors generated.
Moving bool_visitor to global scope lets it compile successfully.</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>