Subject: [Boost-bugs] [Boost C++ Libraries] #4142: Option names should be constructible from strings
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-04-22 22:33:14
#4142: Option names should be constructible from strings
-------------------------------+--------------------------------------------
Reporter: afoglia@⦠| Owner: vladimir_prus
Type: Feature Requests | Status: new
Milestone: Boost 1.43.0 | Component: program_options
Version: Boost 1.42.0 | Severity: Cosmetic
Keywords: |
-------------------------------+--------------------------------------------
The constructor and set_name methods of option_description take only const
char pointers and not strings. (Likewise for the
option_description_easy_init operator().)
Currently code such as the below fails to compile
{{{
std::string help="help";
po::options_description desc("Allowed options");
desc.add_options()
(HELP, "produce help message");
}}}
We use strings for easy reuse them when checking the variable map of
parsed options.
This came up on the dev list last month, and Vladimir said he'd look into
why overloads for strings didn't already
exist.([http://lists.boost.org/Archives/boost/2010/03/162646.php]) I
assume you haven't had time, so here's a more persistent reminder.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4142> 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