The current signature allows creation only for real NaNs with payloads. It's impossible to create float or double NaNs with a payload.
Proposal:
Redesign NaN to allow creation of other floating point types:
T NaN(T = real, U)(const U payload) if (isFloatingPoint!T && isUnsigned!U)
Comment #1 by robert.schadek — 2024-12-01T16:32:04Z