<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:nodakai@gmail.com" title="NODA, Kai <nodakai@gmail.com>"> <span class="fn">NODA, Kai</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - assertion failure assigning to immutable generic lambda init-capture"
href="https://bugs.llvm.org/show_bug.cgi?id=20717">bug 20717</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;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>nodakai@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - assertion failure assigning to immutable generic lambda init-capture"
href="https://bugs.llvm.org/show_bug.cgi?id=20717#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - assertion failure assigning to immutable generic lambda init-capture"
href="https://bugs.llvm.org/show_bug.cgi?id=20717">bug 20717</a>
from <span class="vcard"><a class="email" href="mailto:nodakai@gmail.com" title="NODA, Kai <nodakai@gmail.com>"> <span class="fn">NODA, Kai</span></a>
</span></b>
<pre>As of today, clang trunk@306691 can correctly reject the test case with
-std=c++14 or 1z:
/tmp/m.cpp:2:39: error: cannot assign to a variable captured by copy in a
non-mutable lambda
auto x = [i = 0](auto n) { return i += n; }(1);
~ ^
/tmp/m.cpp:2:46: note: in instantiation of function template specialization
'main()::(anonymous class)::operator()<int>' requested here
auto x = [i = 0](auto n) { return i += n; }(1);
^
1 error generated.</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>