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
. Every trivially copyable object
among the result and each object created within it
acquires the value representation produced;
if any such object does not receive a value,
the behavior is undefined
. 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 behavior is erroneous, and the result is as specified above
.
The result does not otherwise contain any indeterminate or erroneous values
.