News for hackers. Stuff that matters.
Re:Switching from C++ to Rust by ivmaykov on Monday March 13, 2023 @09:22PM (#35146033)
You would probably use std::variant in C++ if you want tagged unions.

So you could have a struct or class with one std::variant field and some methods which can match on the type of the variant. But it would be kind of clunky.

There are no comments on this comment yet.