[Boost-bugs] [Boost C++ Libraries] #7495: Support for boost::optional in boost::program_options

Subject: [Boost-bugs] [Boost C++ Libraries] #7495: Support for boost::optional in boost::program_options
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-11 11:39:54


#7495: Support for boost::optional in boost::program_options
--------------------------------------------------+-------------------------
 Reporter: Dmitry Trifonov <user61a@…> | Owner: vladimir_prus
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.52.0 | Severity: Optimization
 Keywords: |
--------------------------------------------------+-------------------------
 It would be nice to allow support for boost::optional<T> arguments in
 program_options, so you can write following:

 {{{
 #!div style="font-size: 100%"
   {{{#!cpp
 optional<std::string> optionalArg;
 options_description desc("allowed options");
 desc.add_options() ("optional", value(&optionalArg), "specify optional
 argument");
   }}}
 }}}

 And shouldn't bother with argument checking using variables_map.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7495>
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:10 UTC