[patch] std::polar requires non-negative rho

Jonathan Wakely jwakely@redhat.com
Wed May 13 14:03:00 GMT 2015


On 13/05/15 15:36 +0200, Daniel Krügler wrote:
>2015-05-13 15:32 GMT+02:00 Jonathan Wakely <jwakely@redhat.com>:
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4383.html#2459
>>
>> Voted into the WP in Lenexa.
>>
>> Tested powerpc64le-linux, comitted to trunk.
>
>What about assertions regarding non-NAN rho and finite theta, as
>decided for by the LWG 2439?

I don't know how to reliably test those conditions. What if _Tp is not
a floating-point type?

The assertion I added addresses the original issue as reported
numerous times to libc++. I don't really care if it doesn't deal with
the additional preconditions added in Cologne, as users don't seem to
expect a meaningful answer for NaNs and infinities.



More information about the Gcc-patches mailing list