3 ms·
Tagged unions are a pretty common exercise in C++, they don't require much code to implement. As for Maybe, if it is basically an "optional" as in other langua
by hellofunk 11y ago
Tagged unions are a pretty common exercise in C++, they don't require much code to implement.
As for Maybe, if it is basically an "optional" as in other languages, then the newer c++17 has <optional>, if I'm not mistaken.