You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the `ArgParser` to support CLI arguments with lists of strings.
For example, one can now implement an argument like
```
--colors "yellow,green,navy blue,pink"
```
The type of the argument must be `std::vector<std::string_view>`.
To implement such a CLI argument in our shell, you can do
```cpp
ADD(std::vector<std::string_view>, void *_, nullptr,
nullptr, "--colors",
"A comma-separated list of colors.",
[&](std::vector<std::string_view> colors) {
std::cerr << "received colors are:\n";
for (auto color : colors) std::cerr << " " << color << '\n';
});
```
0 commit comments