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

Subject: [Boost-bugs] [Boost C++ Libraries] #1645: Invalid unicode support for default_value
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-02-19 10:50:12


#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: |
--------------------------+-------------------------------------------------
 The following example could not be compiled:
 =================================================================

 #include <string>
 #include <boost/program_options.hpp>

 namespace po = boost::program_options;

 int main()
 {
   std::wstring test;
   po::options_description desc("Allowed options");
   desc.add_options()
     ("test", po::wvalue<std::wstring>(&test)->default_value(L"value"),
 "description");
 }

 =================================================================

 It is due to wvalue::default_value tries to do
 lexical_cast<std::string>(std::wstring).
 Also I cannot change default_value to default_value("value") as soon as it
 accepts only something convertible to std::wstring.
 In other words it is impossible to specify default_value for wstring
 option.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1645>
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:49:57 UTC