<div dir="ltr">--> <a href="http://lists.llvm.org">lists.llvm.org</a><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Ettore Speziale</b> <span dir="ltr"><<a href="mailto:speziale.ettore@gmail.com">speziale.ettore@gmail.com</a>></span><br>Date: 26 August 2015 at 14:35<br>Subject: Re: [PATCH] __attribute__((enable_if)) and non-overloaded member functions<br>To: Nick Lewycky <<a href="mailto:nlewycky@google.com">nlewycky@google.com</a>><br>Cc: llvm cfe <<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>><br><br><br>Hello,<br>
<span class=""><br>
> Sorry about the extreme delay. This patch slipped through the cracks, and I only noticed it again when searching my email for enable_if. Committed in r245985! In the future, please feel free to continue pinging weekly!<br>
<br>
</span>NP, thank you for committing the patch.<br>
<br>
Unfortunately it contains a little error in the case of no candidate has been found. For instance consider the following test case:<br>
<br>
struct Incomplete;<br>
<br>
struct X {<br>
void hidden_by_argument_conversion(Incomplete n, int m = 0) __attribute((enable_if(m == 10, "chosen when 'm' is ten")));<br>
};<br>
<br>
x.hidden_by_argument_conversion(10);<br>
<br>
I would expect to get an error about Incomplete, as the compiler cannot understand how to convert 10 into an instance of Incomplete. However right now the enable_if diagnostic is emitted, thus masking the more useful message about Incomplete.<br>
<br>
The attached patch solved the problem by delaying the point where the enable_if diagnostic is issued.<br>
<br>
Thanks,<br>
Ettore Speziale<br>
<br>
</div><br></div></div>