Returns: An object of type
To. Each bit of the value representation of the result
is equal to the corresponding bit in the object representation
of
from. Padding bits of the result are unspecified
. For the result and each object created within it,
if there is no value of the object's type corresponding to the
value representation produced, the behavior is undefined
. If there are multiple such values, which value is produced is unspecified
. A bit in the value representation of the result is indeterminate if
it does not correspond to a bit in the value representation of
from or
corresponds to a bit
for which the smallest enclosing object is not within its lifetime or
has an indeterminate value (
[basic.indet])
. A bit in the value representation of the result is erroneous
if it corresponds to a bit
for which the smallest enclosing object has an erroneous value
. For each bit
b in the value representation of the result
that is indeterminate or erroneous,
let
u be the smallest object containing that bit enclosing
b:
If
u is of unsigned ordinary character type or
std::byte type,
u has an indeterminate value
if any of the bits in its value representation are indeterminate, or
otherwise has an erroneous value
.Otherwise, if
b is indeterminate, the behavior is undefined
.Otherwise, the behaviour is erroneous, and the result is as specified above
.
The result does not otherwise contain any indeterminate or erroneous values
.