Why does std::visit take a variable number of variants?
Trying to get more familiar with C++17, I've just noticed std::visit : template <class Visitor, class... Variants> constexpr /*something*/ visit(Visitor&& vis, Variants&&... vars); Why does std::visit not take a single variant, but rather any number of variants? I mean, you can always take some standard library function and have it take multiple parameters with the same role, working on all of them (e.g. std::find() for multiple elements in a container); or you could be taking multiple visitors and using them on the same variant. So, why this specific 'variadification'? To make multiple