<div dir="ltr">Oh, then I take it back.  For something as central as ErrorOr, let's leave in the portable safe bool idiom.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 16, 2014 at 10:13 AM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 16/01/2014 18:05, Reid Kleckner wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With the impending switch to C++11, feel free to cleanup instances of this safe bool idiom.<br>
</blockquote>
<br></div>
Very unfortunate news on that front: explicit operators aren't support until MSVC 2013.<br>
<br>
  <a href="http://msdn.microsoft.com/en-us/library/hh567368.aspx" target="_blank">http://msdn.microsoft.com/en-<u></u>us/library/hh567368.aspx</a><br>
<br>
That means LLVM_EXPLICIT will still be defined to nothing on MSVC 2012, resulting in inappropriate conversions taking precedence over the bool operator.<br>
<br>
My heart sank when I saw this won't be in our supported C++11 set.<br>
<br>
Alp.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Wed, Jan 15, 2014 at 10:19 AM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a> <mailto:<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@<u></u>gmail.com</a>>> wrote:<br>

<br>
    This seems to be the more common way to implement operator bool in<br>
    LLVM. Any reason why the one in ErrorOr was different?<br>
<br>
    Cheers,<br>
    Rafael<br>
<br>
    ______________________________<u></u>_________________<br>
    llvm-commits mailing list<br></div>
    <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a> <mailto:<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.<u></u>edu</a>><br>
    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><div class="im"><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</font></span></blockquote></div><br></div>