<div dir="ltr"><a class="gmail_plusreply" id="plusReplyChip-0" href="mailto:richard@metafoo.co.uk" tabindex="-1">+Richard Smith</a> for visibility.<br><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020 at 12:56 PM Robinson, Paul via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Richard Smith made a patch in f041e9ad for CWG2352.<br>
As a consequence of this patch, we had an obscure test failure,<br>
and it's not clear to me that it's an intentional consequence.<br>
So I figured I'd ask here.<br>
<br>
Reduced test case:<br>
<br>
bool foo(void * const * const *       &&) { return false; }<br>
bool foo(void *       * const * const &)  { return true; }<br>
bool bar() {<br>
  return foo(reinterpret_cast<void***>(2));<br>
}<br>
<br>
Prior to the patch, the compiler selected the second overload;<br>
after the patch, it selects the first overload.  Apparently there's<br>
some subtle difference in the preferred-ness of one over the other,<br>
and AFAICT the const-nesses aren't supposed to factor in any more?<br>
so it's about the &-ref versus the &&-ref?<br>
<br>
As I said, mainly I want to make sure this was intentional; if it<br>
is, we can fiddle our test and that's the end of it.  But if it's<br>
not intentional, this change is in the almost-final Clang 10.0<br>
release, and might want to be fixed before it goes out.<br>
<br>
Thanks,<br>
--paulr<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>