Index: boost/program_options/detail/parsers.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/program_options/detail/parsers.hpp,v retrieving revision 1.3 diff -u -b -u -3 -r1.3 parsers.hpp --- boost/program_options/detail/parsers.hpp 8 Jun 2004 08:14:09 -0000 1.3 +++ boost/program_options/detail/parsers.hpp 17 Jun 2004 10:39:35 -0000 @@ -36,7 +36,7 @@ basic_command_line_parser:: basic_command_line_parser(int argc, charT* argv[]) : common_command_line_parser( - to_internal(detail::make_vector(argv+1, argv+argc))) + to_internal(detail::make_vector(argv+1, argv+argc))) {} Index: libs/program_options/src/convert.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/program_options/src/convert.cpp,v retrieving revision 1.5 diff -u -b -u -3 -r1.5 convert.cpp --- libs/program_options/src/convert.cpp 11 Jun 2004 06:11:34 -0000 1.5 +++ libs/program_options/src/convert.cpp 17 Jun 2004 10:39:50 -0000 @@ -78,6 +78,7 @@ namespace boost { +#ifndef BOOST_NO_STD_WSTRING std::wstring from_8_bit(const std::string& s, const std::codecvt& cvt) @@ -106,7 +107,6 @@ utf8_facet; } - std::wstring from_utf8(const std::string& s) { @@ -134,6 +134,7 @@ return to_8_bit(s, BOOST_USE_FACET(facet_type, locale())); } +#endif namespace program_options { @@ -142,10 +143,12 @@ return s; } +#ifndef BOOST_NO_STD_WSTRING std::string to_internal(const std::wstring& s) { return to_utf8(s); } +#endif } Index: libs/program_options/src/parsers.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/program_options/src/parsers.cpp,v retrieving revision 1.13 diff -u -b -u -3 -r1.13 parsers.cpp --- libs/program_options/src/parsers.cpp 10 Jun 2004 08:46:24 -0000 1.13 +++ libs/program_options/src/parsers.cpp 17 Jun 2004 10:39:50 -0000 @@ -61,6 +61,7 @@ namespace boost { namespace program_options { +#ifndef BOOST_NO_STD_WSTRING namespace { woption woption_from_option(const option& opt) { @@ -83,6 +84,7 @@ for (unsigned i = 0; i < po.options.size(); ++i) options.push_back(woption_from_option(po.options[i])); } +#endif namespace detail { Index: libs/program_options/src/value_semantic.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/program_options/src/value_semantic.cpp,v retrieving revision 1.3 diff -u -b -u -3 -r1.3 value_semantic.cpp --- libs/program_options/src/value_semantic.cpp 8 Jun 2004 07:06:44 -0000 1.3 +++ libs/program_options/src/value_semantic.cpp 17 Jun 2004 10:39:50 -0000 @@ -20,6 +20,7 @@ bool utf8) const { if (utf8) { +#ifndef BOOST_NO_STD_WSTRING // Need to convert to local encoding. std::vector local_tokens; for (unsigned i = 0; i < new_tokens.size(); ++i) { @@ -27,12 +28,16 @@ local_tokens.push_back(to_local_8_bit(w)); } xparse(value_store, local_tokens); +#else + throw std::runtime_error("UTF-8 conversion not supported."); +#endif } else { // Already in local encoding, pass unmodified xparse(value_store, new_tokens); } } +#ifndef BOOST_NO_STD_WSTRING void value_semantic_codecvt_helper:: parse(boost::any& value_store, @@ -55,7 +60,7 @@ xparse(value_store, tokens); } - +#endif string arg("arg"); @@ -171,4 +176,3 @@ }} -