Tagged unions are a pretty common exercise in C++, they don&#x27;t require much code to implement.<p>As for Maybe, if it is basically an &quot;optional&quot; as in other languages, then the newer c++17 has &lt;optional&gt;, if I&#x27;m not mistaken.