Boost logo

Boost Users :

Subject: [Boost-users] feature request: program_options: generate OS dependent options
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-12-08 06:35:43


Following the discussion in, let me then request
that the feature be implemented in program_options.

The 2 systems that I know a little about are POSIX(thanks Ovanes) and
.POSIX: Typically, the command line would options with the '-' being the
delimiter, like for the 'ls' program on a linux system:

  ls --help
  -a, --all do not ignore entries starting with .
  -A, --almost-all do not list implied . and ..
      --author with -l, print the author of each file
  -b, --escape print octal escapes for nongraphic characters
      --block-size=SIZE use SIZE-byte blocks
      --help print this

  dir /?: Typically, the '/' is the delimiter.
  /B Uses bare format (no heading information or summary).

So in fact, I have 2 feature requests :-) :

1. Detect automatically the OS platform and the appropriate delimiter ( / or
- or -- ) for win or POSIX

2. Detect the special option (help) that dislays the usage, which is /? on
windows and --help on POSIX, and treat it symbolically in the user code
calling program_options, ie not having to test for the "help" string as
shown in the tutorial.

I can create the trac tickets if preferred,


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at