std::variant of two types is equivalent to an
std::variant is only available for C++ 17. A proper
Either type also gives you a better API.
If we ever get unified call syntax, I would advocate using
std::variant with some free functions to implement map and join.