I just watched cppcon talk about Bloomberg datum, variant type that uses redundancy in IEEE754 format to encode what type is stored in datum.
So I was wondering does C++ standard allow for implementations to implement std::optional more efficiently by using the same trick.
Note that this would require that sometimes binary representation of a double stored in optional does not match the binary representation of double passed to constructor.
notes: I care about standard allowing this or not, I know most/all implementations will not bother.
I know IEEE754 is not mandated by the standard, but it is allowed and checkable by implementation.