9 static bool parse(Tuple& tup,
const std::vector<std::string_view>& opts)
11 if constexpr (I == std::tuple_size_v<Tuple>)
17 auto& [name, type] = Prts::PrtsManager::getCommands().back().options[I];
18 using T = std::tuple_element_t<I, Tuple>;
19 for (
size_t i = 0; i + 1 < opts.size(); ++i)
21 if (opts[i] ==
"--" + std::string(name))
23 if constexpr (std::is_same_v<T, int>)
25 std::get<I>(tup) = std::stoi(std::string(opts[i + 1]));
27 else if constexpr (std::is_same_v<T, double>)
29 std::get<I>(tup) = std::stod(std::string(opts[i + 1]));
32 std::get<I>(tup) = opts[i + 1];