As I know C++ now allows multiple dispatch for std::variant: https://en.cppreference.com/w/cpp/utility/variant/visit2.htm....
And std::variant is now a better choice for cases like in the article above, where previously inheritance was used to represent a closed set of possible subtypes.