|
|
|
|
|
by mFixman
121 days ago
|
|
Is this the first type of sum-type option choosing statement present for C++ unions? I've been waiting for this feature since the year 1978. Still, it's a wasted opportunity not to have a language-level overload to the `switch` statement that allows nice pattern matching. Even with std::is_within_lifetime C++ unions are prone to errors and hard to work with. |
|
https://en.cppreference.com/w/cpp/utility/variant.html