Update README.md

This commit is contained in:
Pranav Srinivas Kumar 2019-03-31 17:35:34 -04:00 committed by GitHub
parent b3c83177e4
commit 48c6365ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,6 +112,15 @@ Here's what's happening:
- argv is further parsed to identify the inputs mapped to ```-c```. - argv is further parsed to identify the inputs mapped to ```-c```.
* Using ```-cab``` will throw an error since argparse expects two inputs for the argument ```-c```. * Using ```-cab``` will throw an error since argparse expects two inputs for the argument ```-c```.
Notice how argparse is able to quietly and peacefully return an std::vector<float> when asked for it.
```cpp
auto c_vector = program.get<std::vector<float>>("-c");
auto c_list = program.get<std::list<float>>("-c");
```
Both of these above statements will work. Argparse has specializations implemented for both ```std::vector``` and ```std::list```.
## Examples ## Examples
### Positional Arguments ### Positional Arguments