[Boost][program-options] Original position of an argument in command-line.

Hi all. I have a question regarding boost.program_options. I want to parse a command-line but I want to know the order in which each option appeared in the command line. Is this possible? Thanks in advance.


Germán Diago wrote:
Hi all. I have a question regarding boost.program_options.
I want to parse a command-line but I want to know the order in which each option appeared in the command line. Is this possible? Thanks in advance.
parse_command_line returns vector< basic_option<charT> >, which are in the order of occurence. This is a point where you can do logic based on the order. variables_map does not store order information. HTH, -- Vladimir Prus Mentor Graphics +7 (812) 677-68-40

parse_command_line returns vector< basic_option<charT> >, which are in the order of occurence. This is a point where you can do logic based on the order. variables_map does not store order information.
Thanks! Very useful!
participants (3)
-
Germán Diago
-
Krzysztof
-
Vladimir Prus