The use of `std::variant` allows combining the four vectors into one which more closely matches the intend and avoids a workaround used before. Note that this uses `std::get_if` instead of `std::get` because `std::get` is only available since macOS 10.14.