Port C++ union to Julia

You can store it as UInt64 and use i64 % UInt32 to get a UInt32 and reinterpret(Float64, i64) to get a Float64. Julia is type safe by default so it’s non-trivial to come up with a representation of C compatible union.

3 Likes