|
Boost Users : |
From: Robert Bielik (robert.bielik_at_[hidden])
Date: 2007-12-12 05:51:06
Vladimir Prus skrev:
> Robert Bielik wrote:
>
>> I've tried using the std::wstring with program options, couldn't make it
>> work, only with std::string. Any workarounds?
>
> There's not enough information to answer. See
>
> http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
>
> for some basic guidelines how to report problems.
Sorry, I thought it was pretty obvious. My bad, I'll elaborate:
std::string strValue;
po::options_description desc("Allowed options");
desc.add_options()
("help,h", "Produce help message")
("string,s", po::value<std::string>(&strValue), "A string value");
works, whereas:
std::wstring strValue;
po::options_description desc("Allowed options");
desc.add_options()
("help,h", "Produce help message")
("string,s", po::value<std::wstring>(&strValue), "A string value");
doesn't even compile on MS VS 2005 (Win XP) boost version 1.34.1. It should
be very easy to test.
/R
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net