I've posted the following question on SO, but I guess
boost::program_options can't help me here:
I have options
--barthat need special treatment, they are repeatable and order should matter. So, for the following:
program --foo 1 --z -f 2 --bar 3 --x --foo 4
I'd like to range a key value map being able to construct
[("foo", 1), ("foo", 2), ("bar", 3), ("foo", 4)].
Please notice the order of this array of tuples, it's the same as that in the command line. I've discarded non-important options in the array, but they may be present in the command line nonetheless.
It seems the sole way to allow repeatable options with
composing()for any given option, but then, since each will store all their values in a vector, I lose the order I need for interlacing options.
boost::program_optionshelp with this?
I'm looking for a library that allows me to range through the parsed options (if possible with their names normalized to their long or short names) in the order it's given in the command line because such order is important for me.