<div dir="ltr"><div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On 24 May 2017 3:19 pm, "Tim Northover" <<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_6920231082429354293quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_6920231082429354293quoted-text">On 24 May 2017 at 15:06, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:<br>
> I think this is expected. Clang has an extension where it treats 1.0if as a<br>
> _Complex float if no operator""if is available;<br>
<br>
</div>Since it's breaking some bots, I've reverted my commit while we hash<br>
this out. r303813.</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Sounds good.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_6920231082429354293quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_6920231082429354293quoted-text">
> libc++ has an extension<br>
> where std::complex<float> can be initialized from _Complex float. For the<br>
> same reason, that code has historically worked in C++11 and C++98 modes.<br>
<br>
</div>Are you sure? It looks like it does an implicit cast to float<br>
(discarding the imaginary part) and then calls the "complex(float,<br>
float = 0.0)" constructor to me.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Yikes :-( Maybe libc++ *should* have that extension then. It sounds like we'll silently get the wrong value for any attempt at std::complex / _Complex interop right now:</div><div dir="auto"><br></div><div>_Complex float a;</div><div>std::complex<float> b = a; // discards imaginary component</div><div><br></div><div>That seems pretty scary.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_6920231082429354293quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers.<br>
<font color="#888888"><br>
Tim.<br>
</font></blockquote></div><br></div></div></div>
</div>