Boost logo

Boost Users :

Subject: [Boost-users] Boost program_options - is there a way to make abbreviations for short options
From: tenspd137 . (dcday137_at_[hidden])
Date: 2014-06-06 11:10:58


Hi all,

I was trying to figure out if there is a way to make the short options use
more than one letter to create an abbrieviation. For example:

desc.add_options()
        ("resolution","re","Choose resolution")
        ("raster-level,"rl","Chhose raster mode")
....

I know that by convention and definition, short options are just -(letter),
so that when you ask to print help, you get something like:

-r [--resolution] arg
-r [--raster-level] arg

but I would like to find a way to have

-re [--resolution] arg
-rl [--raster-level] arg

Point is, I have some options that start with the same letter, so being
able to make short abbreivations or acronyms for them would be helpful. If
this is possible, it isn't real clear to me how, and I haven't turned up
much in google.

Any suggestions?

Thanks!



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net