Parse of std::vector says vector should be reversed? #951
-
| 
         The API docs for void CLI::App::parse(vector<string&args) has the following description 
 I assume this means that if you want to convert argc/argv to a std::vector to pass here you need to put them in reverse order?  I want to accept a std::vector because I would like to create a wrapper library to expose a more C++ like interface for parsing.  It seems C++ standard still hasn't specified any C++ language version of the 50 year C api for main.  | 
  
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
| 
         Take a look at This is what is used in most of the tests, put all the arguments in a vector and reverse them, and call the vector parse method.  | 
  
Beta Was this translation helpful? Give feedback.
Take a look at
https://github.com/CLIUtils/CLI11/blob/main/tests/app_helper.hpp
This is what is used in most of the tests, put all the arguments in a vector and reverse them, and call the vector parse method.