<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:ufospoke@gmail.com" title="Frédéric <ufospoke@gmail.com>"> <span class="fn">Frédéric</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Lambda should implicitly capture constexpr variable"
href="https://bugs.llvm.org/show_bug.cgi?id=37504">bug 37504</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;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Lambda should implicitly capture constexpr variable"
href="https://bugs.llvm.org/show_bug.cgi?id=37504#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Lambda should implicitly capture constexpr variable"
href="https://bugs.llvm.org/show_bug.cgi?id=37504">bug 37504</a>
from <span class="vcard"><a class="email" href="mailto:ufospoke@gmail.com" title="Frédéric <ufospoke@gmail.com>"> <span class="fn">Frédéric</span></a>
</span></b>
<pre>OK, I went to the end of this and I am sorry to have disturbed you but it seems
that I was wrong. The thing is that in the same function I had multiple lambdas
referring to a constexpr std::size_t. And for some of them I could remove the
capture and not for the others. So the warning was related to one of the
lambda, and I tried to remove all captures so it did not work.
I now understand that if a lambda uses a constexpr variable in a call with a
const reference, the constexpr must be capture to have a reference at the time
of the call where the reference to the original variable is not accessible.
Thanks for your help.</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>