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