[PATCH] Define 3-argument overloads of std::hypot for C++17 (P0030R1)
Jonathan Wakely
jwakely@redhat.com
Thu Sep 29 10:48:00 GMT 2016
On 29/09/16 12:39 +0200, Rainer Orth wrote:
>Hi Jonathan,
>
>>>That would suggest Solaris uses include/c_std/cmath (where I forgot to
>>>add the new overloads) rather than include/c_global/cmath ... is that
>>>right?
>>
>> Alternatively it's using c_global/cmath but _GLIBCXX_USE_C99_MATH_TR1
>> is not defined, as the new overloads are inside that block. I thought
>> that was defined for Solaris though, which is why we have the
>> __CORRECT_ISO_CPP11_MATH_H_PROTO there in that file.
>
>it is indeed, at least initially. What I see in preprocessed input is
>this:
>
>ro@galeras 208 > grep _GLIBCXX_USE_C99_MATH testsuite/normal4/hypot.ii
>#define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH
>#define _GLIBCXX_USE_C99_MATH_TR1 1
>#undef _GLIBCXX_USE_C99_MATH
>#undef _GLIBCXX_USE_C99_MATH_TR1
>
>It turns out the #undef's are from <math.h>:
>
>#if __cplusplus >= 201103L
>#undef _GLIBCXX_USE_C99_MATH
>#undef _GLIBCXX_USE_C99_MATH_TR1
>#endif
>
>No idea what this nonsense is trying to accomplish! It's already in
>Solaris 11.3, however.
Wow.
If only there was some way the Solaris team could contact us so we
could coordinate and stop adding more and more hacks to mess with each
others headers. But I assume they don't have access to the www or
email, because the only other explanation is too rude to say on a
public list.
>> Once again I wish we had a Solaris machine in the compile farm, or it
>> was possible to install a Solaris VM and get OS updates without paying
>> Oracle for the privilege.
>
>That's easily doable: Solaris is free for development use; you get
>access to the release (11, 11.1, 11.2, 11.3, ...) versions, just not to
>patches/updates.
Yes, but because the libc headers get changed by patches and updates,
I found it was useless to install it in a VM. Because I had outdated
headers I couldn't test how our build system interacts with a fully
updated version of Solaris.
>They do have a program for free academic use of
>Solaris, including updates, these days: https://academy.oracle.com/.
That might be useful, I'll see if I qualify. Thanks.
More information about the Libstdc++
mailing list