Re: [Boost-bugs] [Boost C++ Libraries] #1645: Invalid unicode support for default_value

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1645: Invalid unicode support for default_value
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-12 12:14:58


#1645: Invalid unicode support for default_value
--------------------------+-------------------------------------------------
 Reporter: anonymous | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: program_options
  Version: Boost 1.34.1 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------
Changes (by Sascha Ochsenknecht <s.ochsenknecht@…>):

 * cc: s.ochsenknecht@… (added)

Comment:

 This problem appears for every value type which makes problem with
 lexical_cast<std::string>().

 Here is a workaround:
 There as an overloaded version of default_value() which can be used to
 define the string representation of the default value:
 {{{
 ("test", po::value<std::wstring>()->default_value(L"value", "value"),
 "description.")
 }}}

 This string (second parameter of default_value()) is then used for the
 help output. I would recommend to use this approach.

 Please comment.

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