This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: V3 PATCH: numeric_limits<> support, fix PR/3865
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
Richard> Anyway, I was thinking about how to define your booleans.
Richard> Seems like the following would work:
Richard> bool has_infinity = __builtin_huge_val() / 2 == __builtin_huge_val();
>From the name I would expect __builtin_huge_val() to return a large
finite value, not infinite...
paul