2 ms·
> Accessing a data member that's within the common initial sequence[1] of both union alternatives is perfectly well-defined.[2] Wow, thanks for the detailed an
by feelamee 2y ago
> Accessing a data member that's within the common initial sequence[1] of both union alternatives is perfectly well-defined.[2]
Wow, thanks for the detailed answer. I'm not that familiar with standard. I will explore your links.
> I don't know about Rust, but in C++ you probably wouldn't be able to type-pun `std::byte[]` in all the ways you'd need to during constant evaluation
Probably yes. Despite on that I used `constexpr` in impl, I didn't tested this.
I will add task to backlog (and never return to it, xd).