With the introduction of the new fixed-width floating point types in C++23 (the std::floatN_t types in <stdfloat>), some guarantees regarding the representation of floating-point types are not yet totally clear to me.
My reading from the latest draft (6.8.3) suggests the following:
floatanddoubleare never guaranteed to be IEC-60553 binary floating-point types, even ifstd::float32_tandstd::float64_texist;_FloatNtypes (from C23) are not guaranteed to exist, even though it is "recommended practice" (6.8.3.7).
(A comment on 2.: Even if _FloatN types do exist -- following the recommended practice --, this still does not assert that float and double are IEC-60553 binary floating-point types. There is no indication of that. For contrast, in ISO C23, if _Float32 and _Float64 exist, then float and double are guaranteed to be IEC-60553 binary floating-point types with the same representation respectively, yet distinct types; see C23 F.2.1.1 and H.2.2.3-4.)
The cppreference page on this matter suggests 2. is wrong, but I don't have the final published standard document to check.
Therefore, which one of the above assertions (1. or 2.) are correct, and which ones are incorrect?
char8_tdoesn't necessarily affect the encoding of plainchar.std::numeric_limits<>::is_iec559created to know if a type is IEC-60559 / IEEE-754, precisely?numeric_limitsis not usable in the preprocessor.numeric_limitsis compatible withconstexprandstatic_assert- which will break compilation if these types aren't compatible with what you need. It also allow to safely define anusingclause to define an alternative type to ensure IEC-60559 compatibility... Standard doesn't guarantee this compatibility, but provides a way to check it. What else do you need? Standard is clear, IEC-60559 isn't always available, same for fixed-pointfloat. Both assertions are correct, even if very few compilers will lack these features.