<div dir="ltr"><div dir="ltr">On Thu, 19 Mar 2020 at 05:28, Romain GEISSLER <<a href="mailto:romain.geissler@amadeus.com">romain.geissler@amadeus.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> Le 15 mars 2020 à 20:14, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> a écrit :<br>
> <br>
> No, we still don't have a resolution from the C++ committee, but it's being discussed by various implementers, and we hope to present to the committee a suggested set of changes to minimize the pain to users as soon as we can. I expect we will change /something/ as a DR fix against C++20, but the exact details are unclear.<br>
<br>
Hi,<br>
<br>
Thanks for the heads up.<br>
<br>
I am not sure how valid is my request, but I found a case where I wished -Wambiguous-reversed-operator would avoid what today with clang 10 is a strong error.<br>
<br>
Consider this code: the == comparison warning is avoidable with -Wambiguous-reversed-operator, but not the != comparison. This make existing C++17 code behavior non-symetric when migrating to pack C++20, and a bit awkward for users:<br>
<br>
template <typename T> struct A<br>
{<br>
bool operator==(const T&) const;<br>
bool operator!=(const T&) const;<br>
};<br>
<br>
struct B : public A<B> {};<br>
<br>
bool f()<br>
{<br>
bool a1 = B() == B(); // Works, only a -Wambiguous-reversed-operator warning<br>
bool a2 = B() != B(); // Strong error, which you can't avoid with -Wno-ambiguous-reversed-operator flag<br>
}<br>
<br>
Do you think that in the meantime while we wait for the C++ committee to standardize a real DR clang 10 should be update to also just warns in such cases involving != ?</blockquote><div><br></div><div>At this point it's likely too late to do anything different for Clang 10... but the rule we're discussing to fix this issue would make the above case work. I'll see about implementing that sooner rather than later.<br></div></div></div>