C++ (and C) strict aliasing rules include that a char*
and unsigned char*
may alias any other pointer.
AFAIK there is no analogous rule for
From the current Standard draft ([basic.types]/2):
For any object (other than a base-class subobject) of trivially copyable type T, whether or not the object holds a valid value of type T, the underlying bytes ([intro.memory]) making up the object can be copied into an array of char, unsigned char, or std::byte ([cstddef.syn]).43 If the content of that array is copied back into the object, the object shall subsequently hold its original value.
So yes, the same aliasing rules apply for the three types, just as cppreference sums up.
It also might be valuable to mention ([basic.lval]/8.8):
If a program attempts to access the stored value of an object through a glvalue of other than one of the following types the behavior is undefined:
- a char, unsigned char, or std::byte type.