Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3733: Detect platform to choose the conventional option for help
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-12-09 10:39:15
#3733: Detect platform to choose the conventional option for help
--------------------------------+-------------------------------------------
Reporter: hicham@⦠| Owner: vladimir_prus
Type: Feature Requests | Status: new
Milestone: | Component: program_options
Version: Boost 1.41.0 | Severity: Cosmetic
Keywords: |
--------------------------------+-------------------------------------------
Changes (by s_ochsenknecht):
* cc: s.ochsenknecht@⦠(added)
Comment:
I usually define a mapping table to map my command line options to the
string value, e.g.:
{{{
enum MyOptions {
HELP = 0,
VERSION,
INPUT
};
string options[] = { "help", "version", "input" };
... /// usage
if (vm.count(options[HELP]))
}}}
Within my code I then use only the enum type. Errors are then detect
during compile time.
You can define this options[] array for each platform you want to support
and were it is different to the 'reference' array.
I sgguest to keep this type of mapping in the client code. Currently there
is no 'special' handling for any options, all handled in the same way and
I would like to keep this behaviour.
My suggestion is to set on "wont fix".
Thanks,
Sascha
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3733#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC