mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 07:04:39 +00:00
Update README.md
This commit is contained in:
parent
3733ce170f
commit
082938e2cd
@ -135,7 +135,7 @@ auto files = program.get<std::vector<std::string>>("--input_files"); // {"confi
|
||||
```ArgumentParser.get<T>()``` has specializations for ```std::vector``` and ```std::list```. So, the following variant, ```.get<std::list>```, will also work.
|
||||
|
||||
```cpp
|
||||
auto files = program.get<std::list<std::string>>("--input_files"); // Works! files = {"config.yml", "System.xml"}
|
||||
auto files = program.get<std::list<std::string>>("--input_files"); // {"config.yml", "System.xml"}
|
||||
```
|
||||
|
||||
Using ```.action```, one can quickly build a list of custom objects from command line arguments. Here's an example:
|
||||
|
Loading…
Reference in New Issue
Block a user