Currently several places assume the VAL member is always at least the same size as pVal. In particular for a memcpy in the move assignment operator. While this is a true assumption, it isn't good practice to assume this.
This patch gives the union a name so we can write the memcpy in terms of the union itself. This also adds a similar memcpy to the move constructor where we previously just copied using VAL directly.
This patch is mostly just a mechanical addition of the U in front of VAL and pVAL everywhere. But several constructors had to be modified since we can't directly initializer a field of named union from the initializer list.
For the string constructor I pushed the VAL initialization down to where we know whether we need to use VAL or pVal. This leaves the upper bits of the union unitialized on a 32-bit target, but I'm not sure that's really a problem.
For the uint64_t constructor and the copy constructor I just removed the initialization of VAL to 0 altogether. pVal or VAL will always be assigned as needed. Again this makes the upper bits of the union garbage on 32-bit targets, but hopefully that's ok. This removal also makes the compiled binaries smaller because the compiler was unable to infer that the store is unnecessary on 64-bit target due to slow case init function being out of line.