Open maickrau opened 1 year ago
The main difficulty would be parsing these together. It seems reasonable that you could split the values with a comma. Then I could support a pair or tuple and expect exactly the number of arguments in the type. For example
cxxopts::value<std::tuple<int, int, int>>
would accept
--option 1,2,3
Hi, I'd like an option to input two values for a parameter and take them as an input. This would differ from
std::vector
values in that the number of values given is constant. The use case I was trying to solve is optionally inputting a file with data and an another file with metadata describing the previous file, where the user can either include both or leave both out but including one without the other is invalid. Here's an example of what it would look like:Ideally this could also be used with
std::vector
and similarly with
std::tuple
for more than 2 values.