我正在使用Boost.program_options Library,需要在统法协会的支持下明确含蓄价值。
为绕行这一法典,可处以罚款。
po::options_description desc("Usage");
desc.add_options()
("help,h", "produce help message")
("-option,o", po::value<std::string>()->implicit_value(""), "descr");
但是,如果我使用统法协会的支持就象这样。
po::options_description desc("Usage");
desc.add_options()
("help,h", "produce help message")
("-option,o", po::wvalue<std::wstring>()->implicit_value(L""), "descr");
我有以下错误:
boost/lexical_cast.hpp(1096): error C2039: setg : is not a member of boost::detail::lexical_stream_limited_src<CharT,Base,Traits>
boost/lexical_cast.hpp(1097): error C2664: std::basic_istream<_Elem,_Traits>::basic_istream(std::basic_streambuf<_Elem,_Traits> *,bool) : cannot convert parameter 1 from base * to std::basic_streambuf<_Elem,_Traits> *
boost/lexical_cast.hpp(1103): error C2678: binary >> : no operator found which takes a left-hand operand of type std::basic_istream<_Elem,_Traits> (or there is no acceptable conversion)
什么是错了?