Date: Sun, 24 Aug 2025 20:03:49 +0000
Yes, I understand that.
I'm requesting feedback as to whether reinterpret_cast should be made to work between floating-point types having identical representations.
Should I bother to author such a proposal or would I be wasting my time?
Also, insight into the intended purpose of std::float32_t and std::float64_t would be welcome.
It seems that C++ intends them to be used in scientific codes. Yes?
-----Original message-----
From: Jason McKesson via Std-Proposals <std-proposals_at_[hidden]>
Sent: Sunday, August 24 2025, 11:37 am
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Jason McKesson <jmckesson_at_[hidden]>
Subject: Re: [std-proposals] TBAA and extended floating-point types
On Sun, Aug 24, 2025 at 12:31 PM Paul Caprioli via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> > You can reinterpret_cast char8_t* to char* just fine.
>
> But one cannot reinterpret_cast between std::float64_t* and double* (and use the resulting pointer).
The reason that the `char*` cast works is because `char*` gets to be
an exception to aliasing *in general*. It wasn't done to specifically
allow this use case; it's just a happy accident.
> P1467R9 discusses implicit conversions, overload resolution, and adding extended floating-point types to <cmath>.
> It seems the extended floating-point types were intended to be used.
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2025-08-24 20:03:50