<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:eric@efcs.ca" title="Eric Fiselier <eric@efcs.ca>"> <span class="fn">Eric Fiselier</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - INVOKEing pointer to const&-qualified member function with rvalue results in an error"
href="https://bugs.llvm.org/show_bug.cgi?id=40524">bug 40524</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>FIXED
</td>
</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>eric@efcs.ca
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - INVOKEing pointer to const&-qualified member function with rvalue results in an error"
href="https://bugs.llvm.org/show_bug.cgi?id=40524#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - INVOKEing pointer to const&-qualified member function with rvalue results in an error"
href="https://bugs.llvm.org/show_bug.cgi?id=40524">bug 40524</a>
from <span class="vcard"><a class="email" href="mailto:eric@efcs.ca" title="Eric Fiselier <eric@efcs.ca>"> <span class="fn">Eric Fiselier</span></a>
</span></b>
<pre>Invoking a pointer to a 'const &' member function on an rvalue is a C++2a
extension. Prior to C++2a GCC and Clang accept it as conforming extension. But
in order for the extension to be conforming, it has to be disabled in SFINAE
contexts -- otherwise it could change the meaning of well-defined code.
If you compile your example with -std=c++17 -pedantic-errors then both
invocations are rejected. (<a href="https://godbolt.org/z/ofS4AB">https://godbolt.org/z/ofS4AB</a>)
Both libc++ and libstdc++ reject this prior to C++2a but accept it after. This
is the correct behavior. There is nothing to do here.</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>