id summary reporter owner description type status milestone component version severity resolution keywords cc 7929 boost::lexical_cast< std::string, std::wstring > gives a compiler error. nate@… Vladimir Prus "This causes a problem with `boost::program_options::typed_value< std::wstring, wchar_t >::default_value( const std::wstring& v )` which attempts to use lexical_cast to convert `v` into a `std::string`. Using `lexical_cast` to convert a wide string to a normal one may be debatable, but program_options should not give a compiler error on a valid use case such as the one shown below. Luckily you can work around this by providing an explicit `std::string` version or not using the `default_value` method at all. ==== lexical_cast error ==== {{{#!cpp #include #include int main( int argc, wchar_t* argv[] ){ std::wstring wstr = L""some string""; std::string str = boost::lexical_cast< std::string >( wstr ); return 0; } }}} ==== program_options error ==== {{{#!cpp #include #include int main( int argc, wchar_t* argv[] ){ namespace po = boost::program_options; po::options_description opts( ""Some opts"" ); std::wstring str = L""""; opts.add_options() ( ""o"", po::wvalue< std::wstring >( &str ) ->default_value( L""default value"" ), // This line causes error. ""an option"" ); return 0; } }}} " Bugs new To Be Determined program_options Boost 1.52.0 Problem antoshkka@…